Powered by Ajaxy
Digg StumbleUpon LinkedIn YouTube Flickr Facebook Twitter RSS Reset

PHP: Vérifier si Le fichier est accessible en écriture

<html>
<head>
<title>Is the file writable: is_writable()</title>
</head>
<body>
<?php
$file = "test.txt";
outputFileTestInfo( $file );
function outputFileTestInfo( $f ){
   if ( ! file_exists( $f ) ){
       print "$f n'existe pas<BR>";
      return;
   }
   print "$f ".(is_writable( $f )?"est ":"n'est ")." inscriptible<br>";
}
?>
</body>
</html>
 
           
       

No comments yet.

Leave a Comment


− three = 2