php 无法在服务器上执行
所以我安装了php,但现在每当我在浏览器中访问该url(例如test.php)时,它都不是可执行文件,它会提示我下载它。我的 httpd.conf 文件中有这个:
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
这就是我过去在服务器上的内容,它允许我执行 php。知道我可能做错了什么吗?以下是网址链接:
http://108.166.126.202/test.php
谢谢!
更新:问题出在我的浏览器中,而不是服务器上。我在 Firefox(而不是 Chrome)中打开了该网址,它没有给我带来任何问题。
So I am installed php but now whenever I go to the url in the browser, e.g. test.php, it is not an executable file and it prompts me to download it. I have this in my httpd.conf file:
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
And this is what I have had on my servers in the past that has allowed me to have my php execute. Any idea what I could be doing wrong? Here is a link to the url:
http://108.166.126.202/test.php
Thanks!
Update: The issue was in my browser, not on the server. I opened the url in Firefox (instead of chrome) and it gave me no issues.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
它对我来说效果很好,也许你应该用不同的浏览器尝试一下?
听起来像是您这边的错误设置,而不是服务器的错误设置。
It works fine for me, perhaps you should try it with a different browser?
Sounds like a faulty setting on your side and not the server's.