I need to see if a file is writeable with PHP code. I usually use
$var = fopen("this.txt", 'w');
if(!$var){ die("this isnt writeable"); }
But, that doesnt work in CLI, this PHP script is CLI, so what it does is opens it, then throws the error, which is weird.I looked, the only thing close is the is_writeable, but that only checks if the file/folder belongs to the current user.
so any ideas? Thanks
Edited by Jaan, 09 December 2008 - 09:49 PM.
Please use code tags when you're posting your codes!


Sign In
Create Account


Back to top









