摘要:
1、在php.ini里面设置max_execution_time = 120; 2、通过PHP的ini_set函数设置ini_set("max_execution_time", "120"); 3、通过set_time_limit 函数设置set_time_limit(120); 以上几个数字设置为 阅读全文
摘要:
xhr2 将图片拖拽到此 0% ajax上传--> 上传 ... 阅读全文
摘要:
public function init() { parent:: init(); } 阅读全文
摘要:
首先我们在控制器里创建一个actions方法,用于使用yii\captcha\CaptchaAction 显示页面代码如下: 阅读全文
摘要:
将文件放入 阅读全文
摘要:
打开数据库配置文件common\config\main-local.php 阅读全文
摘要:
2.0用的参数是_csrf token = "<?php echo \Yii::$app->request->getCsrfToken()?>", $.ajax({ type:"post", url:"http://XXX.XXX.XXX/basic/web/index.php?r=admin/pu 阅读全文
摘要:
yii2-advanced版本 common 目录为公共资源目录,我们可以把定义的方法放在这个目录下,在此目录下我们随意建立一个文件比如”helps”目录,因为考虑到公共方法可能会有功能上的划分类,所以建立一个统一目录来进行管理。 建立公共方法 调用 1 2 阅读全文
摘要:
普通 首先确认apache2配置 1. 开启 apache 的 mod_rewrite 模块 去掉LoadModule rewrite_module modules/mod_rewrite.so前的“#”符号; 2. 修改 apache 的 AllowOverride 把 AllowOverride 阅读全文
摘要:
将frontend/web/index.php复制到项目根目录,修改为: 同时在frontend/config/main.php中assetManager中添加如下代码: 同样将backend/web/index.php复制到项目根目录,命名为admin.php(名称可随意,为了安全建议设置复杂点) 阅读全文