Title
Text
wsdfsfdsa
我的css文件夹和header.php页面都是在news文件夹下面的,不知道到底哪里错了,请大牛指点啊,本人是刚刚接触php的
回复讨论(解决方案)
这是有效地路径吗?
难道 index.php 是目录?
$config['base_url'] = 'http://127.0.0.1/myPhpStudy/index.php/';
是路径
" />试试?
" />试试?
不行啊
href="=base_url("css/yangshi.css");?>"这个在页面上打印出来的连接发出来看看
href="=base_url("css/yangshi.css");?>"这个在页面上打印出来的连接发出来看看
href="http://127.0.0.1/myPhpStudy/index.php/css/yangshi.css" />
这个也不行啊
贴出的的目录结构
并指出你的文件的位置
在网站直接输入http://127.0.0.1/myPhpStudy/index.php/css/yangshi.css能访问吗?是不是css这个目录限制访问的?
在网站直接输入http://127.0.0.1/myPhpStudy/index.php/css/yangshi.css能访问吗?是不是css这个目录限制访问的?
显示404 Page Not Found
贴出的的目录结构
并指出你的文件的位置
执行的文件为 myPhpStudy/index.php
样式表在 myPhpStudy/application/css 中
所以样式表的路径应为
dirname($this->config->item('base_url')) . '/application/css/'
执行的文件为 myPhpStudy/index.php
样式表在 myPhpStudy/application/css 中
所以样式表的路径应为
dirname($this->config->item('base_url')) . '/application/css/'
这个也不行,这个连接点开后是404 Page Not Found
我在myPhpStudy下面加上.htaccess文件,然后访问就会出现Internal Server Error
RewriteEngine On
RewriteEngine on
RewriteCond $1 !^(index\.php|images|css|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]
谢谢你们,问题已经解决了,是wampserver下面的一个配置文件出错了
本文原创发布php中文网,转载请注明出处,感谢您的尊重!