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

让busybox的http服务支持php

WBOY
Release: 2016-06-06 19:58:59
Original
1698 people have browsed it

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

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

 

 

 

Related labels:
source:php.cn
Statement of this Website
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
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template