thinkphp框架
1.路由采用PATH_INFO的格式进行访问
2.表单无须经过validate验证即可进行数据库crud操作
YII 框架
1.yii有gii作为生成model,controller的辅助
2.yii的表单必须由ActiveForm创建的表单类
3.yii的表单提交都会经过crlf,防止攻击
4.yii的表单提交会默认经过validate验证
laravel框架
1.laravel的数据库链接默认先采用env的配置,然后才是config/database.php
的数据库配置
2.laravel的数据库采用数据迁移的方式,迁移位于database/migrations
目录下
3.laravel的访问必须先配置好路由才能进行访问,在routes下的web.php
4.laravel并没有像yii和thinkphp后台分模块,而是在apphtppcontroller新建目录作为后台目录
5.larave有HTTP 中间件,如果用户没有经过授权,中间件会将用户重定向到登录页面
redio选定
laravel
<div class="layui-form-item"> <label class="layui-form-label">网站状态</label> <div class="layui-input-block"> <input type="radio" name="status" value="1" title="启用" @if(isset($config['status'])) {{($config['status']==1)?'checked':''}}@endif><div class="layui-unselect layui-form-radio layui-form-radioed"><i class="layui-anim layui-icon">�</i><div>启用</div></div> <input type="radio" name="status" value="0" title="停用" @if(isset($config['status'])) {{($config['status']==0)?'checked':''}}@endif><div class="layui-unselect layui-form-radio"><i class="layui-anim layui-icon">�</i><div>停用</div></div> </div> </div>
yii
<div class="layui-form-item"> <label class="layui-form-label">是否启用</label> <div class="layui-input-block"> <input type="radio" name="status" value="1" title="是" <?php if ($amdinData->status = 1): ?> checked="checked" <?php endif; ?> ><div class="layui-unselect layui-form-radio layui-form-radioed"><i class="layui-anim layui-icon">�</i><div>是</div></div> <input type="radio" name="status" value="0" title="否" <?php if ($amdinData->status = 0): ?> checked="checked" <?php endif; ?> ><div class="layui-unselect layui-form-radio"><i class="layui-anim layui-icon">�</i><div>否</div></div> </div> </div>
thinkphp5
<div class="layui-form-item"> <label class="layui-form-label">是否启用</label> <div class="layui-input-block"> <input type="radio" name="status" value="1" title="是" {if condition="$admin_data['status'] eq 1 "} checked="checked" {/if}><div class="layui-unselect layui-form-radio layui-form-radioed"><i class="layui-anim layui-icon layui-anim-scaleSpring">�</i><div>是</div></div> <input type="radio" name="status" value="0" title="否" {if condition="$admin_data['status'] eq 0 "} checked="checked" {/if}><div class="layui-unselect layui-form-radio"><i class="layui-anim layui-icon">�</i><div>否</div></div> </div> </div>