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

查看:22
本文介绍了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 文件时遇到了同样的问题.我已经在网上搜索了几个小时,在论坛和谷歌上寻找答案,直到我找到了简单的解决方案.

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.

我将 PHP 文件作为 c 盘上的文件访问(例如 C:xamphtdocsdata.phpfile:///c:/xamp/htdocs/data.php)而不是作为网页(即//localhost/data.php).

I was accessing the PHP file as a file on c drive (eg. C:xamphtdocsdata.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天全站免登陆