我是php框架的新手,我在系统上设置Yii框架时遇到了麻烦。在我的设置中,我按照说明使用Composer并将文件下载到我的www / public-vision / server文件中。 显然,在第一次运行index.php时,我应该看到类似的东西:
不幸的是,我收到了一大堆错误(到目前为止已经达到了20个)。
发生了什么,我需要做些什么来解决这个问题?显然,这似乎是一个配置问题。如果这个问题不够具体,那么我需要注意什么才能提出更有用的问题?
答案 0 :(得分:1)
在shell中运行此命令。 www用户必须获得资产文件夹的写权限。
chmod -R 777 /var/www/public-vision/server/basic/web/assets/
或
chmod -R u+rwx,go+rx,go-w /var/www/public-vision/server/basic/web/assets/
答案 1 :(得分:0)
我明白了。所以有几件事:首先,我切换到Yii 1.1。然后,加载frameowrk,运行
yiic webapp2 [dir]
终端中的,然后运行该文件。我确实遇到了在php.ini中没有初始化日期的问题。所以一定要添加
date.timestamp = America/Los_Angeles.
还要确保更改
.htaccess file according to the yii installation.
RewriteEngine on
# prevent httpd from serving dotfiles (.htaccess, .svn, .git, etc.)
RedirectMatch 403 /\..*$
# if a directory or a file exists, use it directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# otherwise forward it to index.php
RewriteRule . index.php
请参阅此处的指南:
http://www.yiiframework.com/doc/guide/1.1/en/quickstart.installation
最后,如果是案例类型
,您可能会遇到php没有curl或json的问题sudo apt-get install php5-json
这对我有用。
答案 2 :(得分:0)
如果您使用FTP软件(例如filezilla等),您可以通过右键单击目录手动设置目录权限。尝试设置755