您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

PHP读取文件内容

2024/5/28 17:28:18发布24次查看
简介:这是php读取文件内容的详细页面,介绍了和php,有关的知识、技巧、经验,和一些php源码等。
class='pingjiaf' frameborder='0' src='http://biancheng.dnbcw.info/pingjia.php?id=324388' scrolling='no'>
读取文件内容
// 打开文件同时打印文件的每一个字符
 if($myfile = fopen(data.txt, r))
 {
 while(!feof($myfile))
 {
  $mycharacter = fgetc($myfile);
  print($mycharacter);
 }
 fclose($myfile);
 } 
?>
print();?>
// 打开文件同时打印文件的每一行
 if($myfile = fopen(data.txt, r))
 {
  while(!feof($myfile))
  {
   $myline = fgets($myfile, 255);
   print($myline);
  }
 fclose($myfile);
 } 
?>
print();?>
/* 打开文件同时打印文件的每一行,
 同时去掉取回字符串中的 html 语言
 */
 if($myfile = fopen(data.txt, r))
 {
  while(!feof($myfile))
  {
   $myline = fgetss($myfile, 255);
   print($myline);
  }
  fclose($myfile);
 } 
?>
“php读取文件内容”的更多相关文章 》
爱j2ee关注java迈克尔杰克逊视频站json在线工具
http://biancheng.dnbcw.info/php/324388.html pageno:15
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product