代码如下 | 复制代码 |
function poWrite($filename,$data,$method='rb+',$iflock=1,$check=1,$chmod=1){ touch($filename); $handle = fopen($filename,$method); $iflock && flock($handle,LOCK_EX); if(@fwrite($handle,$data)=== FALSE){ fclose($handle); return false; } $method=='rb+' && ftruncate($handle,strlen($data)); fclose($handle); $chmod && @chmod($filename,0777); return true; } function poVarExport($input,$f = true,$t = null) { |
poWrite(INCLUDES."filename.php","<?php $celltype = ".poVarExport($arrayname)."; ?>");