function write ( $data ){ $return = false; if ( $handle = @fopen ( 'error.txt','a+' ) ) { $i=0; while ( !flock ( $handle,2 ) && $i++ { usleep ( 500000 ); } if ( $i { flock ( $handle,3 ); $return = true; } fclose ( $handle ); } return $return;}复制代码php
08-29 18:22