WAMP 配置说明
WAMP 软件版本为 3.0.6
www目录配置更改
- 路径:wamp\bin\apache\apache2.4.23\conf\httpd.conf
# DocumentRoot "${INSTALL_DIR}/www"
# <Directory "${INSTALL_DIR}/www/">
DocumentRoot "D:/Code/kodcloud"
<Directory "D:/Code/kodcloud/">
- 路径:wamp\bin\apache\apache2.4.23\conf\extra\httpd-vhosts.conf
# DocumentRoot c:/wamp/www
# <Directory "c:/wamp/www/">
DocumentRoot D:/Code/kodcloud
<Directory "D:/Code/kodcloud/">
- 路径:wamp\scripts\config.inc.php
// $wwwDir = $c_installDir.'/www';
$wwwDir = 'D:/Code/kodcloud';
- 路径:wamp\wampmanage.ini
;Type: item; Caption: "www 目录"; Action: shellexecute; FileName: "c:/wamp/www"; Glyph: 2
Type: item; Caption: "www 目录"; Action: shellexecute; FileName: "D:/Code/kodcloud"; Glyph: 2
- 路径:wamp\wampmanage.tpl
;Type: item; Caption: "${w_wwwDirectory}"; Action: shellexecute; FileName: "${wwwDir}"; Glyph: 2
Type: item; Caption: "${w_wwwDirectory}"; Action: shellexecute; FileName: "D:/Code/kodcloud"; Glyph: 2
访问权限更改
- 路径:wamp\bin\apache\apache2.4.23\conf\extra\httpd-vhosts.conf
# Require local
Require all granted
PHP代码调试(WAMP + VSCode + XDebug)
- 在apache下的php.ini中配置xdebug
[xdebug]
zend_extension ="c:/wamp/bin/php/php7.0.10/zend_ext/php_xdebug-2.4.1-7.0-vc14.dll"
xdebug.remote_enable = 1
xdebug.remote_host=127.0.0.1
xdebug.remote_handler = "dbgp"
xdebug.remote_port=9000
xdebug.remote_autostart=1
- 配置VScode
- 2.1 安装PHP debug插件
- 2.2 配置php可执行路径
"php.validate.executablePath":"D:\\wamp64\\bin\\php\\php5.6.40\\php.exe",
"php.validate.enable": true,
- 2.3 在./vscode目录下创建launch.json文件
{
"version": "0.1.0",
"configurations": [
{
"name": "Listen for XDebug",
"type": "php",
"request": "launch",
"port": 9000
},
{
"name": "Launch currently open script",
"type": "php",
"request": "launch",
"program": "${file}",
"cwd": "${fileDirname}",
"port": 9000
}
]
}
- 2.4 重启Apache