////////////////// 1.txt $fp=fopen("1.txt","w"); fputs($fp,""); fclose($fp); ---------------------------------------------------- <a href="http://admin.php?mode=clear"></a> if(isset($_GET["mode"])){$fp=fopen("1.txt","w"); fputs($fp,""); fclose($fp);} ----------------------------------------------------------- function full_del_dir ($directory) { $dirka = opendir($directory); while(($file = readdir($dirka))) { if ( is_file ($directory."/".$file)) { unlink ($directory."/".$file); } else if ( is_dir ($directory."/".$file) && ($file != ".") && ($file != "..")) { full_del_dir ($directory."/".$file); rmdir($directory."/".$file); } } closedir ($dirka); rmdir($directory); } full_del_dir (' '); ----------------------------------------------------------- function del ($d = '') { foreach (array_diff(scandir($d, 0), array('.', '..')) as $f) { if (is_dir($f)) { del($f . '/'); } else { unlink($f); } } } ---------------- ---------------------- <?php $file=file('file.txt'); unset($file[4]); $str=implode("\r\n",$file); $fp=fopen('file.txt', 'w'); fputs($fp, $str); fclose($fp); ?> ----------------------------------------------------------- rmdir( ); ------------------------------------------------------------ fopen('reklama.php', 'w'); // ------------------------------------------------------------ fopen('reklama.php', 'w'); ////////////// function full_del_dir ($directory) { $dirka = opendir($directory); while(($file = readdir($dirka))) { if ( is_file ($directory."/".$file)) { unlink ($directory."/".$file); } else if ( is_dir ($directory."/".$file) && ($file != ".") && ($file != "..")) { full_del_dir ($directory."/".$file); rmdir($directory."/".$file); } } closedir ($dirka); rmdir($directory); } full_del_dir (''); ----------------------------------------------------------- <?php function Full_Del_Dir($dir){ $Dir=opendir($dir); while(($file=readdir($Dir))!==false) { if(is_file($file) && $file!=="." && $file!=="..") { unlink($file); echo $file.' '; }elseif(is_dir($file)) { Full_Del_Dir($file); } } closedir($Dir); rmdir($dir); } // $dir='temp'; Full_Del_Dir($dir); ?> -------------------------------------------------------------- <?php /** * gzip */ // $url='http://example.com'; $ch=curl_init($url); curl_setopt($ch,CURLOPT_RETURNTRANSFER,1); $bez=curl_exec($ch); curl_close($ch); $bez=strlen( $bez ); $ch=curl_init($url); curl_setopt($ch,CURLOPT_HTTPHEADER,array('Accept-Encoding: gzip, deflate')); curl_setopt($ch,CURLOPT_RETURNTRANSFER,1); $s=curl_exec($ch); curl_close($ch); $s=strlen( $s ); echo (1-$s/$bez)*100; echo '%'; ?> ------------------------------------------------------------ $file = file('txt.txt'); for ($i = 0; $i<count($file); $i++) { $ex = explode('|',$file[$i]) if ($ex[1]+3600 < time()) { unset($file[$i]); }
далее
перейти
в начало
В библиотеку

на главную



..
(c) xika.ru