PHP内置web服务器
F:\php\php-5.4.24-Win32-VC9-x86>php -h
-a Run interactively -c <path>|<file> 指定php.ini路径 -n 不使用php.ini -d foo[=bar] 手动设置php.ini的一个属性值 -e Generate extended information for debugger/profiler -f <file> 解析和执行一个文件 -h 帮助信息 -i 类似phpinfo()显示的信息 -l 语法检查 -m 显示php加载的Modules如:PDO、gd、xml -r <code> 运行代码 F:\php\php-5.4.24-Win32-VC9-x86>php -r echo'ok'; -F <file> 解析和执行文件 -S <addr>:<port> 运行内置服务器如:localhost:80 -t <docroot> 设置网站文档根目录 -v PHP版本信息 -z <file> 加载一个zend扩展 --ini 显示php.ini --rf <name> 显示function信息 --rc <name> 显示class信息 --re <name> 显示extension信息 --rz <name> 显示Zend extension信息 --ri <name> 显示某一扩展配置信息
启动Web服务器
F:\php\php-5.4.24-Win32-VC9-x86>php -S localhost:80
启动web服务器时指定文档的根目录
F:\php\php-5.4.24-Win32-VC9-x86>php -S localhost:80 -t F:\www