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

PHP 文件的分割

WBOY
WBOYOriginal
2016-06-21 09:07:161492browse

$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);
}



Statement:
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