PHP交叉编译和移植_PHP教程
[plain]
./configure --prefix=/home/pub/johnny/network/install-php --host=mips-linux-gnu --datadir=/home/pub/johnny/network/install-php/data --disable-FEATURE --disable-all "CC=mips-linux-gnu-gcc -EL" "CFLAGS=-EL" "LDFLAGS=-EL"
make
make istall
./configure --prefix=/home/pub/johnny/network/install-php --host=mips-linux-gnu --datadir=/home/pub/johnny/network/install-php/data --disable-FEATURE --disable-all "CC=mips-linux-gnu-gcc -EL" "CFLAGS=-EL" "LDFLAGS=-EL"
make
make istall
4、测试:
1)、修改fastcgi.conf
添加:
[plain]
fastcgi.server += (
"/test.php" =>
((
"socket" => "/tmp/lighttpd.test.event.socket",
"bin-path" => "/tmp/network/sbin/php-cgi",
# "bin-path" => "/home/pub/johnny/network/install-php/bin/php-cgi",
# "bin-path" => "/tmp/NMP/bin/test.php",
"max-procs" => 1,
# "host" => "127.0.0.1",
# "port" => 8081,
"check-local" => "disable",
))
)
fastcgi.server += (
"/test.php" =>
((
"socket" => "/tmp/lighttpd.test.event.socket",
"bin-path" => "/tmp/network/sbin/php-cgi",
# "bin-path" => "/home/pub/johnny/network/install-php/bin/php-cgi",
# "bin-path" => "/tmp/NMP/bin/test.php",
"max-procs" => 1,
# "host" => "127.0.0.1",
# "port" => 8081,
"check-local" => "disable",
))
)
2)、把/home/pub/johnny/network/install-php/bin/php-cgi copy 到开发板/tmp/network/sbin/php-cgi
3)、在/tmp/network/webpages/下创建test.php
[php]
phpinfo();
?>
phpinfo();
?>
4)、开发板上启动lighttpd
5)、在PC上输入http://192.168.*.*/test.php,则在浏览器上显示php的信息
下一篇: PHP中会话技术Cooki详解
推荐阅读
-
PHP的Yii框架中创建视图和渲染视图的方法详解,yii框架_PHP教程
-
使用Xdebug调试和优化PHP程序之[1]_PHP教程
-
require.include.require_once.include_once的用法和区别_PHP教程
-
简单谈谈php中的unicode和utf8编码_PHP教程
-
深入剖析php执行原理(2):函数的编译,深入剖析php_PHP教程
-
php ci框架中加载css和js文件失败的原因及解决方法,_PHP教程
-
PHP中常用的函数库和一些小技巧_PHP教程
-
php获取中文拼音首字母类和函数分享_PHP教程
-
解析php addslashes()与add*es()函数的区别和比较_PHP教程
-
[视频教程]PHP100视频教程16:PHP小偷程序原理和实例