如何从其他位置运行php文件


How to run php file from other location?

我已经在C驱动器中安装了我的XAMPP,通常,我将文件保存在这个位置C:''examplep''htdocs并将其运行为localhost/example.php。如果我将我的项目文件夹更改为E:''project''example.php,那么在XAMPP中需要更改哪些设置才能从C:''以外的其他保存位置运行文件

您可以通过编辑XAMPP''apache''conf''httpd.conf中的DocumentRoot条目来重新定位项目DocumentRoot C:''examplep''htdocs''

带有:

DocumentRoot E:'Project'

本教程将指导您逐步完成此操作。

http://mattots.blogspot.com/2009/10/changing-document-root-in-xampp.html