上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 31 下一页
摘要: 关联文件:myErrorHandler.php (上一篇)先测试通知级别的错误的自定义处理:testErrorHandler.php<?phprequire_once 'myErrorHandler.php';error_reporting(-1);set_error_handler(array('... 阅读全文
posted @ 2015-06-14 19:50 nemo20 阅读(229) 评论(0) 推荐(0)
摘要: 要查询数据库中哪些表含有目标字段,可以使用语句:SELECT TABLE_SCHEMA,TABLE_NAMEFROM information_schema.`COLUMNS`WHERE COLUMN_NAME='字段名字'参考:MySQL中,一个字段在多张表都存在,怎么用sql语句一次性查询这些表呢 阅读全文
posted @ 2015-05-29 13:23 nemo20 阅读(307) 评论(0) 推荐(0)
摘要: 自定义错误处理器更加智能。message = $message; $this->filename = $filename; $this->line = $line; $this->vars = $vars; } //根据不同的错误号完成不同的操作... 阅读全文
posted @ 2015-05-28 23:49 nemo20 阅读(225) 评论(0) 推荐(0)
摘要: PHP VERSION = 5.3.10一、关于 $_REQUESTPHP 文档关于 $_REQUEST 的说明:说明默认情况下包含了 $_GET,$_POST 和 $_COOKIE 的数组。更新日志版本 说明5.3.0 引入 request_order。该指令会影响 $_REQUEST... 阅读全文
posted @ 2015-05-28 00:06 nemo20 阅读(304) 评论(0) 推荐(0)
摘要: 对于英文字符可使用如下形式(模板中):{$vo.title|substr=0,5}如果是中文字符thinkphp提供了msubstr,用法如下:function msubstr($str, $start=0, $length, $charset=”utf-8″, $suffix=true)//使用如... 阅读全文
posted @ 2015-05-27 17:04 nemo20 阅读(1355) 评论(0) 推荐(0)
摘要: 通过 Set_error_handler() 函数设置用户自定义的错误处理函数。步骤:① 创建错误处理函数② 设置不同级别调用函数③ Set_error_handler() 函数制定接管错误处理—— 如果使用了该函数,程序会绕过标准的 PHP 错误处理。摘自:php.netmixed set_err... 阅读全文
posted @ 2015-05-26 22:43 nemo20 阅读(486) 评论(0) 推荐(0)
摘要: 当系统发生了很严重的问题,需要立刻发送给管理员。可以通过 error_log() 将错误以邮件形式发送到邮箱。在 php.ini 中设置:sendmail_from = 472323087@qq.com然后设置:sendmail_path = "G:\sendmail\sendmail.exe -t... 阅读全文
posted @ 2015-05-23 12:34 nemo20 阅读(941) 评论(0) 推荐(0)
摘要: 【将错误记录到系统日志中】在 php.ini 中将 error_log 设置为:error_log = syslog或者在运行时使用 ini_set() 函数设置。【例1】<?php//关闭错误显示ini_set('display_errors', 0);//开启错误日志功能ini_set('log... 阅读全文
posted @ 2015-05-22 00:57 nemo20 阅读(536) 评论(0) 推荐(0)
摘要: 在调用验证码之前加上 ob_clean();不显示验证码的代码:public function verify(){ $verify = new \Think\Verify(); $verify->entry();}修改为:public function verif... 阅读全文
posted @ 2015-05-21 09:54 nemo20 阅读(379) 评论(0) 推荐(0)
摘要: 【记录错误(生产环境)】php.ini:① 开启 / 关闭 错误日志功能log_errors = On② 设置 log_errors 的最大字节数log_errors_max_len = 1024其他:选项描述log_errors设置是否将错误信息记录到日志或者 error_log 中error_l... 阅读全文
posted @ 2015-05-20 00:28 nemo20 阅读(462) 评论(0) 推荐(0)
上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 31 下一页
访客数:AmazingCounters.com
2016/05/17 起统计