~wwwcommentphp
2 itemsDownload ./*

2 itemsDownload ./*

..
file.php
setup.php


phpfile.php
1 360•  2 years ago•  DownloadRawClose
2 years ago•  1 360

{}
<?php
    function readf($file) {
        $fh=fopen($file,'r');
        if(flock($fh,LOCK_EX)) {
            $data=fread($fh,filesize($file));

            flock($fh,LOCK_UN);
        }
        fclose($fh);
        return $data;
    }

    function writef($file,$data) {
        $fh=fopen($file,'w');
        if(flock($fh,LOCK_EX)) {
            fwrite($fh,$data);

            flock($fh,LOCK_UN);
        }
        fclose($fh);
        return 0;
    }

    function appendf($file,$data) {
        $fh=fopen($file,'a');
        if(flock($fh,LOCK_EX)) {
            fwrite($fh,$data);

            flock($fh,LOCK_UN);
        }
        fclose($fh);
        return 0;
    }

    function no_ext($name) {
        return substr($name,0,strrpos($name,'.'));
    }
?>

Top
©twily.info 2013 - 2024
twily at twily dot info



2 163 127 visits
... ^ v