PHP

From Blue-IT.org Wiki

Revision as of 10:01, 17 March 2013 by Apos (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Test, if a file can be written to directory

<?php
$handle = fopen("/tmp/test.txt", "x");
if ($handle) echo "Success!";
else print_r(error_get_last());
?>