
thinkphp
luogan129
这个作者很懒,什么都没留下…
展开
-
thinkphp(实例化验证器)
php验证 // 实例化验证器 $validate = Loader::validate('Business'); // 验证数据 $data = ['business_name'=>$data['business_name'],'email'=>$data['email'],'contact_phone'=> $da原创 2016-12-27 12:03:50 · 900 阅读 · 0 评论 -
checkbox 使用
checkbox <div class="form-group"> <label style="display: block">币种设置</label> {volist name="co原创 2016-12-27 16:04:29 · 387 阅读 · 0 评论 -
TP5写日志记录
TP5写日志记录/*写文件*/function dingding_log($pay_type,$content){ $filename =$_SERVER['DOCUMENT_ROOT']. '/dingding_log/'.$pay_type.date('Y-m-d').'.txt'; $Ts=fopen($filename,"a+"); fputs($Ts,"原创 2018-01-19 10:44:57 · 11892 阅读 · 0 评论 -
php将数组或字符串写入文件
$fp = fopen('./a.txt', 'a+b');fwrite($fp, var_export($content, true));fclose($fp);$fp = fopen('./a.txt', 'a+b');fwrite($fp, print_r($content, true));fclose($fp); /*写文件*/ public原创 2018-01-19 14:45:53 · 1117 阅读 · 0 评论 -
nginx、TP框架实现兼容pathinfo和rewrite两种url访问方式
1、支持rewrite方式: 在 location / 处添加以下代码if (!-e $request_filename) { rewrite ^(.*)$ /index.php?s=$1 last; break; }最终变成location / { root html/code; index index.php index.html index.htm; if (!-e ...转载 2018-04-26 16:34:36 · 501 阅读 · 0 评论