PHP在XAMPP中不起作用 [英] PHP not working in XAMPP

查看:94
本文介绍了PHP在XAMPP中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Windows的XAMPP 1.7.7中运行PHP时遇到问题.到目前为止,我已经在具有IIS的本地服务器上安装了XAMPP(将端口更改为httpd.conf和其他配置中的81),到目前为止,它可以正常工作,并且我可以连接到xampp/index.php,但无法运行任何.php.我的htdocs中的文件(除html部分外,显示为空白).它可以在我的本地计算机上运行(也已安装IIS),但无法使其在服务器上运行.

I have a problem running PHP in XAMPP 1.7.7 for windows. I've installed XAMPP in a local server with IIS (changed the port to 81 in httpd.conf as well as other configuration) so far it works and I could connect to the xampp/index.php but coulnd't run any .php files in my htdocs (shows blank except for the html part). It works in my local (also have an IIS installed) but couldn't make it work in a server.

任何帮助将不胜感激.

推荐答案

如果我正确地收到了您的问题,我认为在XAMPP中访问php文件时也会遇到相同的问题.我已经在网上搜索了几个小时,并在Google和Google上找到了答案,直到找到简单的解决方案为止.

If I got your question correctly, I think I had the same problem accessing a php file in XAMPP. I have been online for several hours searching forums and Google for the answer, not until I found the simple solution.

我以c驱动器上的文件(例如C:\xamp\htdocs\data.phpfile:///c:/xamp/htdocs/data.php)而不是网页(即//localhost/data.php)的形式访问PHP文件.

I was accessing the PHP file as a file on c drive (eg. C:\xamp\htdocs\data.php or file:///c:/xamp/htdocs/data.php) instead of as a webpage (ie //localhost/data.php).

我希望这对您也有帮助.

I hope this will be helpful to you as well.

这篇关于PHP在XAMPP中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆