How To Check If A File Is Writeable Or Not With Php Code
- Forums
- PHP
- How To Check If A File Is Writeable Or Not With Php Code
This Page Contains information about How To Check If A File Is Writeable Or Not With Php Code By tomtom in category PHP with 1 Replies. [1256], Last Updated: Sat May 18, 2024
tomtom
Sat Mar 14, 2009
1 Comments
268 Visits
today i was writing a script and i wanted to check if a file i wanted to write using php was able to write to. can you tell me how i can check to see if a file is writable or not. i mean i just want to verify that this file i can put information and has the right permissions for writing like editing and adding or removing text from it
how can i do that?
is_writable()
you use the is_writable function for example:if(is_writable($FileName)){
echo 'Can write to this file';
}else{
echo 'Cannot write to this file';
}
hpe that helps