时间:2021-07-01 10:21:17 帮助过:11人阅读
Apache
Download页面
,下载最新版的压缩包;F:\Program Files\Apache
中;F:\Program Files\Apache\conf
目录,编辑器打开 httpd.conf
文件。修改如下部分:
line 37: ServerRoot "c:/Apache24" -> ServerRoot "F:/Program Files/Apache"
line 58: Listen 80 -> Listen 8080
line 218: ServerName www.example.com:80 -> ServerName www.example.com:8080
line 242: DocumentRoot "c:/Apache24/htdocs" -> DocumentRoot "F:/Projects/php"
line 243: ->
line 276: DirectoryIndex index.html -> DirectoryIndex index.php index.htm index.html
line 359: ScriptAlias /cgi-bin/ "c:/Apache24/cgi-bin/" -> ScriptAlias /cgi-bin/ "F:/Program Files/Apache/cgi-bin"
line 375: ->
# php5 support
LoadModule php5_module "F:/Program Files/php/php5apache2_4.dll"
PHPIniDir "F:\Program Files\php"
AddType application/x-httpd-php .php .html .htm
# configure thepath to php.ini
PHP
Download
找到下载链接,下载压缩包;F:\Program Files\php
中;F:\Program Files\php
目录,将 php.ini-development
重命名为 php.ini
,并用编辑器打开这个文件。修改如下部分:
line 736: extension_dir = "ext" -> extension_dir = "F:/Program Files/php/ext"
line 807: upload_tmp_dir = -> upload_tmp_dir = "/upload-files"
line 881: ;extension=php_curl.dll -> extension=php_curl.dll
line 883: ;extension=php_gd2.dll -> extension=php_gd2.dll
line 890: ;extension=php_mbstring.dll -> extension=php_mbstring.dll
line 892: ;extension=php_mysql.dll -> extension=php_mysql.dll
line 895: ;extension=php_openssl.dll -> extension=php_openssl.dll
line 897: ;extension=php_pdo_mysql.dll -> extension=php_pdo_mysql.dll
line 899: ;extension=php_pdo_odbc.dll -> extension=php_pdo_odbc.dll
line 915: ;extension=php_xmlrpc.dll -> extension=php_xmlrpc.dll
line 930: ;date.timezone = -> date.timezone = Asia/Chongqing
line 1417: ;session.save_path = "/tmp" -> session.save_path = "/session"
line 892
后添加: extension=php_mysqli.dll
Download页面
,下载对应系统和PHP版本的dll文件;F:\Program Files\php\ext
中;php.ini
,在文件末尾添加如下内容:
[XDebug]
zend_extension = "F:\Program Files\php\ext\php_xdebug-2.3.3-5.6-vc11-x86_64.dll"
xdebug.profiler_append = 0
xdebug.profiler_enable = 1
xdebug.profiler_enable_trigger = 0
xdebug.profiler_output_dir = "F:\Program Files\php\xdebug"
xdebug.profiler_output_name = "cachegrind.out.%t-%s"
xdebug.remote_enable = 1
xdebug.remote_handler = "dbgp"
xdebug.remote_host = "127.0.0.1"
xdebug.trace_output_dir = "F:\Program Files\php\xdebug"
至此,配置完成。MySQL太简单,就不写了。
以上就介绍了Apache&PHP+Xdebug 安装配置,包括了方面的内容,希望对PHP教程有兴趣的朋友有所帮助。