php5 inpractice看书心得(2)

$argcphp

      传入的参数个数(包括文件)linux

$argv数组

    传入的参数的数组(包括文件)缓存

 

实时查看文件在linux上使用 tail -f 命令ide

在php 中要学会使用fseek()和flush()巧妙的配合来实现实时机制函数

 

######################spa

  
  
  
  
  1. //控制页面缓存的代码 
  2. header("Cache-Control: no-cache,must-revalidate"); 
  3. header("Expires:Mon,26 Jul 1997 05:00::00 GMT"); 

#########################xml

stream_copy_to_stream这个函数rem

  
  
  
  
  1. <?php 
  2. $src = fopen('http://www.example.com''r'); 
  3. $dest1 = fopen('first1k.txt''w'); 
  4. $dest2 = fopen('remainder.txt''w'); 
  5.  
  6. echo stream_copy_to_stream($src$dest1, 1024) . " bytes copied to first1k.txt\n"
  7. echo stream_copy_to_stream($src$dest2) . " bytes copied to remainder.txt\n"
  8.  
  9. ?>  
相关文章
相关标签/搜索