我发现在ie下结果是正确的,但是的firefox下就会出错。 clearstatcache()似乎不起作用。create table news( id int unsigned primary key auto_increment, title varchar(128) not null default '', content varchar(256) not null default '', filename varchar(32) not null default '' )engine=MyISAM charset utf8insert into news(title,content) values('hello1','北京你好');insert into news(title,content) values('hello2','四川你好'); 这是我的表结构,版主有兴趣了可以试试
目前发现跟浏览器有关,clearstatcache()不起作用。create table news( id int unsigned primary key auto_increment, title varchar(128) not null default '', content varchar(256) not null default '', filename varchar(32) not null default '' )engine=MyISAM charset utf8insert into news(title,content) values('hello1','北京你好');insert into news(title,content) values('hello2','四川你好');这是表结构,如有兴趣可以一同进步。
目前发现跟浏览器有关,clearstatcache()不起作用。create table news( id int unsigned primary key auto_increment, title varchar(128) not null default '', content varchar(256) not null default '', filename varchar(32) not null default '' )engine=MyISAM charset utf8insert into news(title,content) values('hello1','北京你好');insert into news(title,content) values('hello2','四川你好');这是表结构,如有兴趣可以一同进步。echo '<tr><td>'.$row['id'].'</td><td>'.$row['title'].'</td><td><a href="showNews.php?id='.$row['id'].'">查看详情</a></td><td><a href="#">修改页面</a></td></tr>'; 把这句改成下面的试试。 echo '<tr><td>'.$row['id'].'</td><td>'.$row['title'].'</td><td><a href="showNews.php?id='.$row['id'].'&t='.time().'">查看详情</a></td><td><a href="#">修改页面</a></td></tr>';
目前发现跟浏览器有关,clearstatcache()不起作用。create table news( id int unsigned primary key auto_increment, title varchar(128) not null default '', content varchar(256) not null default '', filename varchar(32) not null default '' )engine=MyISAM charset utf8insert into news(title,content) values('hello1','北京你好');insert into news(title,content) values('hello2','四川你好');这是表结构,如有兴趣可以一同进步。echo '<tr><td>'.$row['id'].'</td><td>'.$row['title'].'</td><td><a href="showNews.php?id='.$row['id'].'">查看详情</a></td><td><a href="#">修改页面</a></td></tr>'; 把这句改成下面的试试。 echo '<tr><td>'.$row['id'].'</td><td>'.$row['title'].'</td><td><a href="showNews.php?id='.$row['id'].'&t='.time().'">查看详情</a></td><td><a href="#">修改页面</a></td></tr>';依然不行
输出你的 html_file 然后去相同位置 ,你当前这个文件的目录下查找一下是不是存在吧....
这种现象偶有发生,应该是 php 的 bug
一般应给待操作的文件名以路径(相对路径即可,比如 ./)若你的程序段2,是以某种方式循环执行的。
则应考虑是否是缓存的影响,适当的使用 clearstatcache() 函数
手册中有相应说明
echo dirname($html_file); // 加这句看看,是否返回的是当前目录。
clearstatcache()似乎不起作用。create table news(
id int unsigned primary key auto_increment,
title varchar(128) not null default '',
content varchar(256) not null default '',
filename varchar(32) not null default ''
)engine=MyISAM charset utf8insert into news(title,content) values('hello1','北京你好');insert into news(title,content) values('hello2','四川你好');
这是我的表结构,版主有兴趣了可以试试
目前发现跟浏览器有关,clearstatcache()不起作用。create table news(
id int unsigned primary key auto_increment,
title varchar(128) not null default '',
content varchar(256) not null default '',
filename varchar(32) not null default ''
)engine=MyISAM charset utf8insert into news(title,content) values('hello1','北京你好');insert into news(title,content) values('hello2','四川你好');这是表结构,如有兴趣可以一同进步。
目前发现跟浏览器有关,clearstatcache()不起作用。create table news(
id int unsigned primary key auto_increment,
title varchar(128) not null default '',
content varchar(256) not null default '',
filename varchar(32) not null default ''
)engine=MyISAM charset utf8insert into news(title,content) values('hello1','北京你好');insert into news(title,content) values('hello2','四川你好');这是表结构,如有兴趣可以一同进步。echo '<tr><td>'.$row['id'].'</td><td>'.$row['title'].'</td><td><a href="showNews.php?id='.$row['id'].'">查看详情</a></td><td><a href="#">修改页面</a></td></tr>';
把这句改成下面的试试。
echo '<tr><td>'.$row['id'].'</td><td>'.$row['title'].'</td><td><a href="showNews.php?id='.$row['id'].'&t='.time().'">查看详情</a></td><td><a href="#">修改页面</a></td></tr>';
目前发现跟浏览器有关,clearstatcache()不起作用。create table news(
id int unsigned primary key auto_increment,
title varchar(128) not null default '',
content varchar(256) not null default '',
filename varchar(32) not null default ''
)engine=MyISAM charset utf8insert into news(title,content) values('hello1','北京你好');insert into news(title,content) values('hello2','四川你好');这是表结构,如有兴趣可以一同进步。echo '<tr><td>'.$row['id'].'</td><td>'.$row['title'].'</td><td><a href="showNews.php?id='.$row['id'].'">查看详情</a></td><td><a href="#">修改页面</a></td></tr>';
把这句改成下面的试试。
echo '<tr><td>'.$row['id'].'</td><td>'.$row['title'].'</td><td><a href="showNews.php?id='.$row['id'].'&t='.time().'">查看详情</a></td><td><a href="#">修改页面</a></td></tr>';依然不行
如果静态html文件不存在的话,file_get_contents也会触发错误,那么你应该无法继续输出static字样。
所以还是怀疑html文件是存在“某个角落”里的,不妨对你的include path和document_root目录检查下
我也觉得奇怪,我在windows下,搜索html文件,确实不存在。
这段程序在chrome,IE都可以,就是firefox不行。
我用360彻底清除缓存,还是会出现上述问题。