~wwwphp
3 itemsDownload ./*

3 itemsDownload ./*

..
colortime.php
file.php
setup.php


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

{}
<?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 162 791 visits
... ^ v