网上搜了好多答案,基本上都是让你在composer.json里面添加这样一段话: "extra": { "asset-installer-paths": { "npm-asset-library": "vendor/npm", "bower-asset-library": "vendor/bower", "npm-searchable": false, "b…
安装好YII2 后出现 例如以下图错误提示: watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvenF0c3g=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast" alt="" /> 解决方法例如以下: 打开安装好的YII2项目文件夹(YII2安装方法參见 摘取天上星 的博文:http://blog.csdn.net/zqtsx/…
执行composer install后报错: d11wtq/boris v1.0.10 requires ext-pcntl * -> the requested PHP extension pcntl is missing from your system. d11wtq/boris v1.0.10 requires ext-pcntl * -> the requested PHP extension pcntl is missing from your system. Installati…
$this->redirect(['default/error']); Yii::$app->end();上边的代码出现 Calling unknown method: app\modules\mobile\controllers\CompanyController::redirect()错误时,查看引入的控制器类 要引入 yii\web\Controller; Controller:…
手动在数据库中添加了image字段 然后再模型类Image中的 rule方法也将image的验证规则放进去了 但是在 $model = new Image 后,使用$model->iamge 还是报错 Getting unknown property::image 解决方法,在项目的最外层,找到runtime/cache ,删除里面所有的文件缓存,刷新后就好了…
在Yii2中如果设置了 'response' => [  'format' => yii\web\Response::FORMAT_JSON,  'charset' => 'UTF-8',  // ... ], 代表了,控制器输出的全部都是json格式数据,即json字符串: 而如果使用Json::htmlEncode($price): 先引入use yii\helpers\Json; 可以在当前的action中生成json字符串,response对象把这个当普通文本输出…
➜  yii-advanced composer update Loading composer repositories with package information Updating dependencies (including require-dev) Your requirements could not be resolved to an installable set of packages. Problem 1 - yiisoft/yii2 2.0.9 requires bo…
前几天在compute节点更新openstack的包后,发现报错IncompatibleObjectVersion: Version 1.2 of PciDeviceList is not supported,nova服务在compute节点起不来了,就开始google,等了两天果然很多人都有这个错,终于找到了解决的办法. https://bugs.launchpad.net/ubuntu/+source/nova/+bug/1490361 这里bug有人回复是因为controller的open…
Setting read-only property: yii\web\Application::log 配置放在了 components 外面,应该放在里面…
更新Composer依赖报错处理 Fatal error: Declaration of Fxp\Composer\AssetPlugin\Repository\AbstractAssetsRe pository::search() must be compatible with Composer\Repository\RepositoryInterfa ce::search($query, $mode = 0, $type = NULL) in C:\Users\Arthur\AppData\…