FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Read/Write/Execute





yule
We will be checking whether test.txt is Readable, Writable And Executable.
If any of the below code is incorrect please do correct it for me because i made it up using just the is_readable, is_writable, & is_executable Commands.
Code:
<?php
if ( is_readable( "test.txt" ) ) {
  print "test.txt is readable";
}

else  {
  print "test.txt is not readable"; }

if ( is_writable( "test.txt" ) ) {
  print "test.txt is readable";
}

else  {
  print "test.txt is not writable";  }

if ( is_executable( "test.txt" ) ) {
  print "test.txt is executable";
}

else  {
  print "test.txt is not executable"; }
?>
Related topics
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.