search
HomeBackend DevelopmentPHP Tutorial 2011-08-30 筹建PHP开发环境

2011-08-30 搭建PHP开发环境

试用了下iWebSNS,感觉还不错,也趁机会学习下PHP。看了几天文档,之前也拿PHP手册学习了下PHP,语法倒还挺适应的。

今天打算搭建一个开发环境,尤其是调试工具。一开始打算用Zend Debugger,忙乎半天,却发现原来我用Apache2.2做服务器,用的Thread Safe的PHP(VC6编译,版本5.3), Zend Debugger压根不支持。 只好改用XDebugger,PHP.ini设定如下:

[Xdebug]
zend_extension="D:\DevTools\PHP53\ext\php_xdebug.dll"
xdebug.profiler_enable=On
xdebug.profiler_enable_trigger = 1
xdebug.trace_output_dir="D:\Temp\xdebugger"
xdebug.profiler_output_dir="D:\Temp\xdebugger"
xdebug.auto_trace = On
xdebug.remote_autostart=0
xdebug.remote_enable=On
xdebug.remote_port=9000
xdebug.remote_handler="dbgp"
xdebug.remote_host = "127.0.0.1"
;xdebug.remote_log = "D:\Temp\xdebugger\xdebug.log"
xdebug.remote_mode = "req"

使用“zend_extension=”似乎是把XDebugger以Zend Debugger兼容的模式来运行。然后又给Firefox装上EasyDebug插件。终于可以跑Debug了。

?

但还是存在以下不爽之处:

1、Zend Studio的断点设置/取消似乎没原始Eclipse for Java好用,怪怪的

2、开启Remote调试后,只要是运行的文件,Debugger自动跳到该文件第一行开始debug,而不管该文件有没有断点。这跟Java不同,java是有断点才会暂停代码执行…… 这应该是PHP的解释执行机制决定的

3、EasyDebug插件,无论是否开启Debug选项,右下角的图标文字永远是"start debug xxx",结果我在不熟悉图标的情况下,根本不知道现在是否开启了Debug。 现在总算搞清楚了:绿色打钩表示关闭debug;红色停止表示开启了debug……

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
php怎么把负数转为正整数php怎么把负数转为正整数Apr 19, 2022 pm 08:59 PM

php把负数转为正整数的方法:1、使用abs()函数将负数转为正数,使用intval()函数对正数取整,转为正整数,语法“intval(abs($number))”;2、利用“~”位运算符将负数取反加一,语法“~$number + 1”。

SpringBoot项目设置断点debug调试无效怎么解决SpringBoot项目设置断点debug调试无效怎么解决May 11, 2023 am 10:49 AM

刚接触springboot项目,(1)发现断点debug调试无效,很郁闷,网上搜索解决办法。看到的都是一些很复杂的方案,说是远程调试,还要另外开端口号。这和传统的项目不一样,因此觉得没必要。所以经过摸索,发现有一种更加简单的方式,步骤如下:在pom文件的plugin部分加上一段配置:false这样就ok了;(2)关于SpringBoot项目中报错说web.xml文件ismissing的问题,因为传统的web项目都是要web.xml文件的,但是SpringBoot项目是可以不需要web.xml文件

php怎么判断有没有小数点php怎么判断有没有小数点Apr 20, 2022 pm 08:12 PM

php判断有没有小数点的方法:1、使用“strpos(数字字符串,'.')”语法,如果返回小数点在字符串中第一次出现的位置,则有小数点;2、使用“strrpos(数字字符串,'.')”语句,如果返回小数点在字符串中最后一次出现的位置,则有。

在生产服务器上启用XDebug会使PHP变慢吗?在生产服务器上启用XDebug会使PHP变慢吗?Sep 22, 2023 pm 10:41 PM

是的,像XDebug这样的调试器会降低PHP服务器的性能。这就是调试器不放置在服务器环境中的原因。它们部署在不同的环境中,以避免不必要的开销。调试消息无法在已处于生产阶段的应用程序中显示。当将调试行为添加到服务器上,调试引擎附加到PHP进程。它开始接收消息以在断点处停止,但这不是必需的行为,因为它会给其他进程带来高性能打击,从而停止PHP解析器。另一方面,当调试器安装后,它们往往会在服务器中打开端口,因为它们不打算在生产环境中使用。在服务器中打开端口就像为黑客打开一扇窥探之门一样糟糕。

php怎么设置implode没有分隔符php怎么设置implode没有分隔符Apr 18, 2022 pm 05:39 PM

在PHP中,可以利用implode()函数的第一个参数来设置没有分隔符,该函数的第一个参数用于规定数组元素之间放置的内容,默认是空字符串,也可将第一个参数设置为空,语法为“implode(数组)”或者“implode("",数组)”。

php怎么去除首位数字php怎么去除首位数字Apr 20, 2022 pm 03:23 PM

去除方法:1、使用substr_replace()函数将首位数字替换为空字符串即可,语法“substr_replace($num,"",0,1)”;2、用substr截取从第二位数字开始的全部字符即可,语法“substr($num,1)”。

php怎么去掉右边几个字符php怎么去掉右边几个字符Apr 21, 2022 pm 07:45 PM

去掉方法:1、用substr_replace()删除右边n位置开始的全部字符,语法“substr_replace($str,"",-n)”,参数“n”为需要去除的字符个数;2、用substr(),语法“substr($str,0,-n)”。

php怎么去掉数组键值php怎么去掉数组键值Apr 20, 2022 pm 05:12 PM

php去掉数组键值的方法:1、使用“array_keys($array)”语句,可去掉全部键值,返回包含全部键名的数组;2、使用“array_splice($array,$start,$length)”语句,可去掉指定位置的一个或多个键值。

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool

Safe Exam Browser

Safe Exam Browser

Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

SublimeText3 English version

SublimeText3 English version

Recommended: Win version, supports code prompts!

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)