1.安装 

注意在httpd.conf中配置完php之后,要重启下apapche

2.调试

注意要写一下具体的starturl文件,

PHP_apache

3.配置数据库驱动
直接用phpinfo()函数查看。看pod列表目前支持哪些数据库,如果要添加新的驱动,只要修改php.ini中的配置,如添加:

extension=pdo_mysql

 重启apache,则可以看到

PHP_重启_02

vscode + xdebug 调试,按照下面的文档配置(很可能不成功)

我使用的是phpstduy + vscode + phpdebug,  配置的时候没成功,重新把默认的apache卸载后再启动,就好了

调试的时候 chrome是不用装插件的,apache要启动,配置如下

{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Listen for XDebug",
"type": "php",
"request": "launch",
"port": 9000
}

]
}

php.ini配置如下:

[Xdebug]
zend_extension=D:/soft/phpstudy_pro/Extensions/php/php7.3.4nts/ext/php_xdebug.dll
xdebug.collect_params=1
xdebug.collect_return=1
xdebug.auto_trace=On
xdebug.trace_output_dir=D:/soft/phpstudy_pro/Extensions/php_log/php7.3.4nts.xdebug.trace
xdebug.profiler_enable=On
xdebug.profiler_output_dir ="D:\soft\phpstudy_pro\Extensions\tmp\xdebug"
xdebug.remote_enable=On
xdebug.remote_host=127.0.0.1
xdebug.remote_autostart = 1 //这个一定要配置,不配置就不生效
xdebug.remote_port=9000
xdebug.remote_handler=dbgp