Skip to content

Instantly share code, notes, and snippets.

@pix-art
Last active April 14, 2016 14:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pix-art/235f769fc5eeef4d8c299960f8b1089d to your computer and use it in GitHub Desktop.
Save pix-art/235f769fc5eeef4d8c299960f8b1089d to your computer and use it in GitHub Desktop.
<?php
function writeFile($fullpath, $content)
{
if (is_writable($fullpath)) {
if ($fp = fopen($fullpath,'w')) {
if (fwrite($fp,$content)) {
// ...
} else {
return false;
}
} else {
return false;
}
} else {
return false;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment