~wwwphp
3 itemsDownload ./*

3 itemsDownload ./*

..
colortime.php
file.php
setup.php


phpfile.php
1 654•  1 year ago•  DownloadRawClose
1 year ago•  1 654

{}
<?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 018 682 visits
... ^ v