Home > php教程 > php手册 > PHP 文件的分割

PHP 文件的分割

WBOY
Release: 2016-06-21 09:07:16
Original
1491 people have browsed it

$fp = fopen($source_file,'rb')//打开源文件

 if(fseek($fp,$l*$start) == 0)//查找文件的起始位置
 {
  $tmp = fread($fp,$l*($end-$start));//读取文件内容
  fclose($fp);
  if(!$purpose = fopen($purpose_file,'a'))//打开目标文件
   echo "不能打开目标文件";
  fwrite($purpose,$tmp);//写入
  fclose($purpose);
}



Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template