Yii中使用gii遇到“unable to write the file”
来源:互联网 发布:加工中心电脑编程兼职 编辑:程序博客网 时间:2024/06/05 10:44
Yii中使用gii遇到“unable to write the file”
显然这是因为gii没有权限来写文件,所以如果你按照http://www.yiichina.com/doc/guide/2.0/start-gii 这里和之前的步骤来做的话,你必须先把下面文件先删除:
rm /var/www/html/basic/models/Country.php
rm /var/www/html/basic/controllers/CountryController.php
rm /var/www/html/basic/views/country/index.php
然后给web权限:
chown www-data:www-data /var/www/html/basic/models
chown www-data:www-data /var/www/html/basic/controllers
chown www-data:www-data /var/www/html/basic/views/country
接着就可以访问http://机器名/basic/web/index.php?r=gii 来生成model和CRUD,弄完之后访问页面http://机器名/basic/web/index.php?r=country/index,一切正常运行之后,最好把权限改回来:
chown root:root /var/www/html/basic/models
chown root:root /var/www/html/basic/controllers
chown root:root /var/www/html/basic/views/country
0 0
- Yii中使用gii遇到“unable to write the file”
- yii Unable to write the file '/var/www/html/blog/protected/models/User.php'
- Smarty 在sinaapp部署中遇到的问题Uncaught --> Smarty: unable to write file sinaapp
- Yii中使用gii连接数据库报错CDbConnection failed to open the DB connection: SQLSTATE[HY000] [1045] Access denied
- yii gii的使用
- yii gii的使用
- Unable to write to output file pdb
- Yii中使用Gii生成代码时碰到“Setting unknown property: yii\web\Application::gii”
- WARNING: unable to write jarlist cache file
- unable to write jarlist cache file
- unable to write jarlist cache file
- warning:unable to write jarlist cache file
- git error: unable to write file "xxx"
- winform中,使用openfileDialog而引起的“Unable to open the database file"
- qt 中 file generation failure: unable to create the directory
- Visual Studio error BC31019: Unable to write to output file
- unable to write to temp file for saving operation
- Android异常之 unable to write jarlist cache file
- C#几个经常用到的字符串截取
- 安装配置PLSQL Developer
- Impala与Hive的比较
- git基本使用命令
- linux内核线程死锁或死循环(soft lockup)之后如何让系统宕机重启
- Yii中使用gii遇到“unable to write the file”
- bzoj3122 线性同余方程
- 文件指针和文件描述符的区别
- iOS筛选出数组中想要的数据(数组中存储的模型)
- itext 中文替换内容
- cocos2dx工程 配置图标(Icon)和启动图(LaunchImage)的方式
- 一个excel技能测试的文件, 及部分答案
- eclipse最有用快捷键整理
- 3D Local Scene秀你想秀