xuebingnan 2019-07-01
NginxPhpDocker是什么, 主要解决什么问题
基于docker, 快速搭建Nginx+Php本地开发环境(已含常用PHP扩展), nginx、php配置文件,日志文件和php工程代码都在宿主机上, 方便修改.
可以解决:
git clone [email protected]:weiwenwang/NginxPhpDocker.git cd NginxPhpDocker
docker run -it -d \ --name myphp \ -v $PWD/www/php:/www/php \ -v $PWD/www/example:/www/example \ --privileged=true \ wangnan188/nginx-php-docker:v7.2-v1
docker run -it -d \ -p 80:80 \ -p 443:443 \ -v $PWD/nginx-conf/conf.d:/etc/nginx/conf.d \ -v $PWD/nginx-conf/nginx.conf:/etc/nginx/nginx.conf \ -v $PWD/www/html:/www/html \ -v $PWD/www/example:/www/example \ -v $PWD/ssl/server.crt:/etc/nginx/ssl/server.crt \ -v $PWD/ssl/server.key:/etc/nginx/ssl/server.key \ -v $PWD/log/nginx:/var/log/nginx/ \ --link=myphp:myphp_alias \ --privileged=true \ --name=mynginx nginx
这里我举例个例子, 假如我们现在的项目(thinkphp_3.2.3_full)就是thinkphp框架写的, 我如何把它运行起来呢?
第一步: 把代码放在www/example/目录下
第二步: 添加配置文件nginx-conf/conf.d/example-thinkphp.conf, 剩下的就是单纯的nginx配置问题了.
本地做一个host绑定: "127.0.0.1 thinkphp-full.com"
浏览器访问: http://thinkphp-full.com/inde...
extension | status | remark | - | extension | status | remark | - | |
---|---|---|---|---|---|---|---|---|
Core | YES | - | - | redis | YES | - | - | |
ctype | YES | - | - | gd | YES | - | - | |
curl | YES | - | - | xdebug | YES | - | - | |
date | YES | - | - | mongodb | YES | - | - | |
dom | YES | - | - | swoole | YES | - | - | |
fileinfo | YES | - | - | memcached | YES | - | - | |
filter | YES | - | - | memcache | NO | - | - | |
ftp | YES | - | - | |||||
hash | YES | - | - | |||||
iconv | YES | - | - | |||||
json | YES | - | - | |||||
libxml | YES | - | - | |||||
mbstring | YES | - | - | |||||
mysqlnd | YES | - | - | |||||
openssl | YES | - | - | |||||
pcre | YES | - | - | |||||
PDO | YES | - | - | |||||
pdo_sqlite | YES | - | - | |||||
Phar | YES | - | - | |||||
posix | YES | - | - | |||||
readline | YES | - | - | |||||
Reflection | YES | - | - | |||||
session | YES | - | - | |||||
SimpleXML | YES | - | - | |||||
sodium | YES | - | - | |||||
SPL | YES | - | - | |||||
sqlite3 | YES | - | - | |||||
standard | YES | - | - | |||||
tokenizer | YES | - | - | |||||
xml | YES | - | - | |||||
xmlreader | YES | - | - | |||||
xmlwriter | YES | - | - | |||||
zlib | YES | - | - |
后续php extensions有补充, 可能不能及时更新此文章, 最新版本请移步: github
<?php. if (!empty($_POST)) {. $data1 = $_POST["data1"];$data2 = $_POST["data2"];$fuhao = $_POST["fuh