简体   繁体   English

Codeigniter-指向style.css和媒体文件的网址正确,但未显示任何内容

[英]Codeigniter - Url to style.css and media files are correct but nothing is displayed

I've got a huge problem with my codeigniter. 我的codeigniter遇到了很大的问题。 I just moved the codeigniter files to another domain. 我只是将codeigniter文件移到了另一个域。 I've already changed the base_url and the style.css and other media files are implemented with base_url + path_to_the_media_folder. 我已经更改了base_url,并且style.css和其他媒体文件是通过base_url + path_to_the_media_folder实现的。 The path is right, but codeigniter doesn't find my media folder where everything is in. On the other domain this worked totally fine. 路径是正确的,但是codeigniter找不到我所有的媒体文件夹。在另一个域上,这很好。

Maybe this helps solving the problem: The folder in which I have the media and css files is located in the same directory as CIs "application", "media", "system", etc. folders. 也许这有助于解决问题:我拥有媒体和css文件的文件夹与CI的“应用程序”,“媒体”,“系统”等文件夹位于同一目录中。

How can I solve this problem? 我怎么解决这个问题?

Best regards Paul 最好的问候保罗

Is there any error you are getting? 您遇到任何错误吗? Please share the error 请分享错误

try below URL 尝试以下网址

http://your domain name/your folder name/index.php/
There is two chance to get the 404 error
 1) your path is wrong.  2) There is issue on file name or class name.

Controller class names should be all lowercase, and Controller file name should be Uppercase.

like your class name is  
class example extends CI_Controller 

and file name is 

Example.php 

Update: Problem solved Found out that it was only because I forgot to change the .htaccess (because my new domain had a https connection and the old one not). 更新:解决问题发现这仅仅是因为我忘记更改.htaccess了(因为我的新域有一个https连接,而旧域没有)。 Thanks anyone for help. 谢谢任何人的帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM