2017-04-25 58 views
0

Symfony2.8负荷资产形式的public_html /插件文件夹,但会抛出错误。负载Symfony的资产从的public_html/plugins文件夹

我的文件夹结构,

enter image description here

在我的主/生产服务器抛出错误, enter image description here

我不知道该怎么办,到解决这个错误...

我的配置文件..

enter image description here

PHP代码用于资产,

<script src="{{asset('plugins/ckeditor/ckeditor.js')}}"></script> 
     {% if is_granted('IS_AUTHENTICATED_FULLY') %} 
      {% if is_granted('ROLE_FZ_ADMIN') %} 
       <script src="{{asset('plugins/ckeditor/config/fz.js')}}"></script> 
      {% elseif is_granted('ROLE_SUPER_ADMIN') %} 
       <script src="{{asset('plugins/ckeditor/config/super.js')}}"></script> 
      {% elseif is_granted('ROLE_ADMIN') %} 
       <script src="{{asset('plugins/ckeditor/config/admin.js')}}"></script> 
      {% else %} 
       <script src="{{asset('plugins/ckeditor/config/user.js')}}"></script> 
      {% endif %} 
     {% endif %} 
+0

你做了你的'assets:install'吗?你有没有自定义的'.htaccess'?您是否向我们展示了prod环境中的文件夹结构? – goto

+0

Thankyou,我删除了.htaccess,然后在浏览器中没有插件文件夹。然后更改文件夹权限。问题解决了。 –

回答

0

解决:此文件权限错误。将所有文件和文件夹更改为777.问题解决。

chmod 777 -R project_location