Skip to content

Instantly share code, notes, and snippets.

@pix-art pix-art/function2.php Secret
Last active May 30, 2016

Embed
What would you like to do?
<?php
function writeFile($fullpath, $content)
{
if (!is_writable($fullpath)) {
return false;
}
if (!$fp = fopen($fullpath,'w')) {
return false;
}
if (!fwrite($fp,$content)) {
return false;
}
return true;
}
@yerlikayao

This comment has been minimized.

Copy link

yerlikayao commented May 30, 2016


function writeFile($fullpath, $content)
{
    if (!is_writable($fullpath) || !$fp = fopen($fullpath,'w')) || !fwrite($fp,$content)) {
        return false;
    }

    return true;
}

optimized

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.