Heim  >  Artikel  >  php教程  >  让busybox的http服务支持php

让busybox的http服务支持php

WBOY
WBOYOriginal
2016-06-06 19:58:591645Durchsuche

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

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

 

 

 

Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn