致命错误:未知:未能打开所需的'<path to =“”src =“”> / includes / php.content-header.php'</path>

时间:2015-03-08 23:15:49

标签: xampp

我正在通过xampp设置一个模拟网站用于开发目的,但遇到了一个问题。说明如下:

Clone this repository
Install PHP and MySQL, and php5-mysql
Changes to php.ini
    auto_prepend_file=<path to src>/includes/php.content-header.php
    short_tag=On
Get the most recent DB Dump and load it into MySQL
Create user sitename_login with password from includes/class.mysql_db.php
Grant this user permissions to sitename_site

运行本地服务器 桌面版

From sitename.com directory run
    php -S localhost:8000

据我所知,我遵循了应有的说明,但是当试图在xampp中打开php文档时,我收到了这个错误:

Warning: Unknown: failed to open stream: Invalid argument in Unknown on line 0

Fatal error: Unknown: Failed opening required '<path to src>/includes/php.content-header.php' (include_path='.;F:\xampp\php\PEAR') in Unknown on line 0

xampp中的文件夹布局为xampp->htdocs->folderName->includes->php.content-header.php

我已经尝试更改文件夹的位置,但似乎没有解决问题。我尝试编辑php.ini的内容,但即使我从/includes/中取出auto_prepend_file,我也会收到相同的错误。

我可以做些什么来解决这个问题?

1 个答案:

答案 0 :(得分:0)

在您的文件中搜索require(<path to src>/includes/php.content-header.php)并将其更改为require(__DIR__ . "\\includes\\php.content-header.php")(假设您使用的是Windows)