PHP.ini的配置文件: [Xdebug] zend_extension_ts="d:/wamp/php/ext/php_xdebug-2.0.4-5.2.8.dll" xdebug.default_enable = On xdebug.profiler_enable=on xdebug.auto_trace=on xdebug.collect_params=on xdebug.collect_return=on xdebug.trace_output_dir="D:\wamp\debugcache" xdebug.profiler_output_dir="D:\wamp\debugcache" xdebug.remote_enable=on xdebug.remote_handler=dbgp debug.remote_mode=req xdebug.remote_host= localhost xdebug.remote_port=9000 xdebug.idekey=ECLIPSE_DBGP xdebug.show_exception_trace=on xdebug.show_local_vars=on xdebug.show_mem_delta=on
function is_utf8($string) { return preg_match('%^(?:[\x09\x0A\x0D\x20-\x7E]|[\xC2-\xDF][\x80-\xBF]|\xE0[\xA0-\xBF][\x80-\xBF]|[\xE1-\xEC\xEE\xEF][\x80-\xBF]{2}|\xED[\x80-\x9F][\x80-\xBF]|\xF0[\x90-\xBF][\x80-\xBF]{2}|[\xF1-\xF3][\x80-\xBF]{3}|\xF4[\x80-\x8F][\x80-\xBF]{2})*$%xs', $string);
}