易截截图软件、单文件、免安装、纯绿色、仅160KB

很好用的php执行时间分析工具webgrind

以前分析xdebug用的是(wincachegrind)http://sourceforge.net/projects/wincachegrind/
现在直接安装webgrind来调试速度会更好
http://xdebug.org/
下载地址:
Source:
xdebug 2.0.3
Windows modules:
PHP 5.1.2-5.1.7
PHP 5.2.1-5.2.6
PHP 5.3.0dev
windows
编辑php.ini,先注释掉zend:
[Zend]
;zend_extension_ts = “D:\Xampp\php\zendOptimizer\lib\ZendExtensionManager.dll”
启用x-debug
[xdebug]
zend_extension_ts = “D:\Xampp\php\ext\php_xdebug-2.0.0-5.2.2.dll”;必须为完整路径
xdebug.profiler_enable_trigger = 1
xdebug.profiler_output_dir=”D:\Xampp\tmp\xdebug”
linux
安装xdebug扩展
sudo pecl install xdebug
编辑php.ini,启用x-debug
[xdebug]
zend_extension_ts = “/usr/lib/php5/xdebug.so” ;必须为完整路径
xdebug.profiler_enable_trigger = 1
xdebug.profiler_output_dir=”/tmp”
webgrind
(http://code.google.com/p/webgrind/ )
下载地址:http://webgrind.googlecode.com/files/webgrind-release-0.81.zip
下载webgrind,解压缩到web目录
首先访问需要优化的php程序,get/post请求中加入XDEBUG_PROFILE
例如info.php,http://localhost/info.php?XDEBUG_PROFILE
然后访问:http://localhost/webgrind/
默认auto,即为刚刚请求的文件profile,[update]!
程序不兼容IE(本机测试winxp+ie6),如果点了update之后毫无反应,请使用firefox。


相关文档:

用apache_2.2和php 5.2搭建PHP环境

适用于最新的版本PHP-5.2.11和APACHE2.2
下载地址
PHP:http://cn2.php.net/get/php-5.2.11-Win32.zip/from/a/mirror
PHP直接下载http://cn.php.net/distributions/php-5.2.11-Win32.zip
APACHE http://labs.xiaonei.com/apache-mirror/httpd/httpd-2.2.14-win32-src.zip
1、将php解压到C:\php目录下
2、将apache安装 ......

comparing strings in PHP with the == operator

最近在Greg Beaver's的blog上发表的一篇新文章 comparing strings in PHP with the == operator 中提及了PHP的 == 运算符在对字符串进行比较时值得注意的问题。
在某些情况下,PHP会把类数值数据(如含有数字的字符串等)转换成数值处理,== 运算符就是其中之一。在使用 == 运算符对两个字符串进行松散比较时,PHP会把类数 ......

php 验证码

checkcode.php
====================
<?php
session_start();
$funcs = array('imagecreatetruecolor','imagecolorallocate','imagefill','imageline','imagedestroy','imagecolorallocatealpha','imageellipse','imagepng');
if(!function_exists('ob_gzhandler'))
    ob_clean();
 //crea ......

实际开发中可能用到的PHP的字符串操作函数(总结)

在编程的过程当中,字符串的操作是非常重要的并且经常会被用到,字符串常用的操作具体的包括字符串的拼接,替换字符串,查找字符串,比较字符串,复制字符串以及计算字符串的长度等等.
1,拼接字符串
拼接字符串是最常用到的字符串操作之一,在PHP中支持三种方式对字符串进行拼接操作,分别是圆点.分隔符{}操作,还有圆点等号.=来进 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号