Home  >  Article  >  php教程  >  让busybox的http服务支持php

让busybox的http服务支持php

WBOY
WBOYOriginal
2016-06-06 19:58:591644browse

busybox自带个小型http服务器并且可以使用php,挺方便的。 配置方法: 首先,make menuconfig时,选择httpd以及support for running scripts through an interpreter 其次写下配置文件就行了,解释器用php-cgi,在httpd的配置文件下加一行: *.php:/usr/local/

busybox自带个小型http服务器并且可以使用php,挺方便的。

 

配置方法:

首先,make menuconfig时,选择httpd以及support for running scripts through an interpreter

其次写下配置文件就行了,解释器用php-cgi,在httpd的配置文件下加一行:

*.php:/usr/local/bin/php-cgi

 

随便写个t.php ,内容是

phpinfo();

?>

 

然后启动服务试试

#./busybox httpd -c ./httpd.conf

用浏览器访问,应该可以了

 

 

 

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn