thinkphp5 控制器 验证 汉字说明
发表于|更新于|thinkphp
|浏览量:
- 验证规则中的汉字
1 | $this->validate($data,[ |
这个汉字是出现错误时替换出错字段的,例如没有写“汉字”时,会提示’captcha不能为空’,写了“验证码”替换后,会提示“验证码不能为空”
文章作者: developer
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 Dev!
相关推荐
2017-04-02
thinkphp5 phpstudy 显示 No input file specified 解决办法
这是由于运行模式导致的修改入口处的配置 12345678910111213<IfModule mod_rewrite.c> Options +FollowSymlinks -Multiviews RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f #apacheHanlder模式 #RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L] #fastCGI模式 RewriteRule ^(.*)$ index.php [L,E=PATH_INFO:$1]</IfModule>
2017-12-04
thinkphp5 tp5 开启url 兼容模式 方法
thinkcmf 使用thinkphp5开发 虽然号称支持url兼容模式 1index.php?s=a/b/c 实际上没法打开的 需要做如下修改 入口文件修改12$base_url = '/test/thinkcmf/public/';\think\Url::root($GLOBALS["base_url"] . 'index.php?s='); HomeBaseController AdminBaseController修改1$root = empty($GLOBALS["base_url"]) ? cmf_get_root() : $GLOBALS["base_url"]; 登陆控制器修改这时屏蔽验证码 或者修改验证码生成的地方即可
2018-02-01
thinkphp5 缓存 补充使用方法
thinkphp5 文档当中大致有缓存的使用方法,但是比较简略,很多时候难以应对实际工作以下给出缓存的实际用法 使用默认配置时,直接调用cache方法即可 自定义配置12config('cache.path', config('cache_path'));self::$cache = Cache::connect(config('cache')); 应该使用connect方法重新获取缓存实例,并在使用后恢复原来配置
2021-01-15
thinkphp5 自动写入数据库 datetime
123protected $autoWriteTimestamp = 'datetime';protected $dateFormat = 'Y-m-d H:i:s';
2017-08-28
thinkphp5 tp5 子查询 join
123456$GLOBALS["queryid"] = $id;$res = Db::name("cfamily_post")->where("delete_time", 0)->where('id', 'in', function ($query){ $query->name("cfamily_category_post")->where('category_id', $GLOBALS["queryid"])->field('post_id');})->page($page, $listRows)->select(); 123456789$join = [ ["cfamily_category_post relation","post.id = relation.post_id"],];...
2017-01-02
ci laravel lumen slim symfony thinkphp thinkphp5 yii2 phalcon yaf php框架安装后裸跑速度对比
最近比较忙先这样用吧 都是用我的笔记本 Wamp2.5 php5.6 apache2.4.9下跑的环境一致 绝对速度可能没有参考价值,相对速度可以参考,装上换上一样的模板就跑 模板地址 http://www.iguojin.com/ 1<div class="keywords">WE PROVIDE H5 GAMES & WECHAT DEVELOPMENT</div> 跑三遍。。。CI还是很猛的。。我觉得小项目是时候从TP转到CI了 2017-09-06最新测试phalcon可能是小项目首选,原因主要是, 这个框架速度极快, 使用简单,基本上和thinkphp用起来一样方便,没有一些强制性和框架专属的东西,很人性化 他的文档我看了一下只有一个,比较详细,没有藏着掖着的东西,这点算是优于thinkphp和laravel 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354// y...
公告
This is my Blog