Return to Snippet

Revision: 16247
at July 29, 2009 21:10 by disc0nnect


Initial Code
function write($path, $content, $mode="w+"){ if (file_exists($path) && !is_writeable($path)){ return false; } if ($fp = fopen($path, $mode)){ fwrite($fp, $content); fclose($fp); } else { return false; } return true; }

Initial URL
http://www.jonasjohn.de/snippets/php/write.htm

Initial Description

                                

Initial Title
PHP Write to file

Initial Tags
php

Initial Language
PHP