4564 views|1 replies

3238

Posts

5

Resources
The OP
 

OpenWrt builds PHP environment [Copy link]

OpenWrt builds PHP environment Install PHP
  • Connect to the Internet first
  • Install basic PHP environment
root@OpenWrt:~# opkg updateroot@OpenWrt:~# opkg install php5 php5-cgi
  • Modify the configuration file
Add support for PHP script parsing for uhttpd:
root@OpenWrt:~# uci add_list uhttpd.main.interpreter='.php=/usr/bin/php-cgi'
Save the uhttpd configuration and restart uhttpd:
root@OpenWrt:~# uci commit uhttpdroot@OpenWrt:~# /etc/init.d/uhttpd restart
If the PHP page is blank during operation, it may be that PHP has not obtained the time zone. You need to add the following software
root@OpenWrt:~# opkg install zoneinfo-core zoneinfo-asia The above steps have deployed the PHP operating environment on openwrt. Next, we create a mytest.php program in the www directory of the openwr terminal to output helloworld. For more complex PHP, you need to learn more about Baidu. root@Widora:/www# vi mytest.php root@Widora:/www# cat mytest.php PHP Testing ?php echo '

'; ?> Run the relevant URL on the browser and it will be OK. In this way, we can start to deploy a good PHP application or even a small website on our router. This content is originally created by EEWORLD forum user wateras1. If you need to reprint or use it for commercial purposes, you must obtain the author's consent and indicate the source
This post is from RF/Wirelessly

Latest reply

Thanks for sharing, learning  Details Published on 2018-4-19 10:29
Personal signature淘宝:https://viiot.taobao.com/Q群243090717
多年专业物联网行业经验,个人承接各类物联网外包项目
 

1903

Posts

0

Resources
2
 
Thanks for sharing, learning
This post is from RF/Wirelessly
 
 

Guess Your Favourite
Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

快速回复 返回顶部 Return list