本文介绍了apache2上的蛋糕php css加载问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 我的 css 文件未加载。 我刚刚安装了apache2 在 ubuntu 。 (已安装Mysql服务器。) 我已经从官方网站下载了新鲜的 php 但是当我尝试访问它时, CSS 文件未加载。 这是屏幕截图。 / p> 解决方案尝试删除这些文件: /.htaccess /app/.htaccess /app/webroot/.htaccess 并取消注释这行在app / config / core.php [69] 配置:: write('App.baseUrl',env 'SCRIPT_NAME')); 编辑: :据我所知,这是做的应用程序的基本url设置为index.php( env()从可用的源获取环境变量)baseUrl用于重写网址而不使用mod_rewitte,其中 pathinfo 。 My css file is not loading.I have just installed apache2 with php on ubuntu. (Mysql server already installed.)I have placed fresh download of cake php from official site. But when I am trying to access it, CSS file is not loaded.Here is the screen shot. 解决方案 Try deleting these files: /.htaccess /app/.htaccess /app/webroot/.htaccessand uncommenting this line on app/config/core.php [69]Configure::write('App.baseUrl', env('SCRIPT_NAME'));EDIT:to answer your comment: as far as I know, what this does is set the base url of the app to index.php (env() Gets an environment variable from available sources) That baseUrl is used to rewrite the urls without using mod_rewitte, with pathinfo. 这篇关于apache2上的蛋糕php css加载问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
08-28 15:51