apache2上的蛋糕php css加载问题

编程入门 行业动态 更新时间:2024-10-06 11:26:01
本文介绍了apache2上的蛋糕php css加载问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我的 css 文件未加载。

我刚刚安装了apache2 < php 在 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/.htaccess

and 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加载问题

本文发布于:2023-11-02 06:56:33,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1551677.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:蛋糕   加载   css   php

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!