Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/280.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在PHP';s内置服务器?_Php - Fatal编程技术网

如何在PHP';s内置服务器?

如何在PHP';s内置服务器?,php,Php,我的项目使用html作为文件扩展名,我们在apache上处理它的方式与php的方式相同 但是对于开发,我想使用PHP的内置服务器:PHP-s 我可以向它传递一个配置文件(php-S…-c my_conf.ini),但我找不到任何方法强制它将html扩展名作为php文件处理。没有测试,但值得一试: 使用.htaccess AddHandler x-httpd-php .html 编辑另一个尝试选项: 像这样启动服务器php-S 在router.php中,尝试包含.html文件。也许这会有帮助

我的项目使用
html
作为文件扩展名,我们在apache上处理它的方式与
php
的方式相同

但是对于开发,我想使用PHP的内置服务器:
PHP-s


我可以向它传递一个配置文件(
php-S…-c my_conf.ini
),但我找不到任何方法强制它将
html
扩展名作为php文件处理。

没有测试,但值得一试:

使用
.htaccess

AddHandler x-httpd-php .html
编辑另一个尝试选项:

像这样启动服务器
php-S

router.php
中,尝试包含
.html
文件。也许这会有帮助