PHP not working in XAMPP(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.php 或 file:///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 中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:PHP 在 XAMPP 中不起作用
基础教程推荐
- 如何在 Laravel 5.3 注册中添加动态下拉列表列? 2021-01-01
- PHP 类:全局变量作为类中的属性 2021-01-01
- 如何在 Laravel 中使用 React Router? 2022-01-01
- YouTube API v3 点赞视频,但计数器不增加 2022-01-01
- PHP PDO MySQL 查询 LIKE ->多个关键词 2021-01-01
- 有什么方法可以用编码 UTF-8 而不是 Unicode 返回 PHP`json_encode`? 2021-01-01
- 如何替换eregi() 2022-01-01
- 在PHP中根据W3C规范Unicode 2022-01-01
- 学说 dbal querybuilder 作为准备好的语句 2022-01-01
- Cron Jobs 调用带有变量的 PHP 脚本 2022-01-01
