2013年7月24日

php正则测试demo、动态函数

摘要: 正则表达式 :"> 测试字符串 :"> ";if(preg_match_all($pattern, $subject, $matches)){var_dump($matches);}else{echo "preg_match_all({$pattern}, {$subject}) 未匹配到"."\n";}}各种正则模式: 'email' => "/^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/", 'telA 阅读全文

posted @ 2013-07-24 11:48 andydaopeng 阅读(1017) 评论(0) 推荐(0) 编辑

php动态调用方法_sux

摘要: <?phpif(!empty($_GET['funcName'])){$funcName = trim($_GET['funcName']);$funcName();}function activeMethod($methodName){$methodName();}function test(){echo 'test';} 阅读全文

posted @ 2013-07-24 10:49 andydaopeng 阅读(275) 评论(0) 推荐(0) 编辑

php输出错误信息

摘要: error_reporting(E_ALL); ini_set('display_errors','on');header("Content-Type:text/html;charset=utf-8"); 阅读全文

posted @ 2013-07-24 10:44 andydaopeng 阅读(536) 评论(0) 推荐(0) 编辑

导航