The php docs say that the following will return true if successful or false if it fails.
rename('test/test1/','test/test2/test1/');
How do I get the true or false? If I run the exact function and it's succesful, the folder gets moved as hoped and there is no output. If it fails, then it just prints out an error message.
How do I test if true or false so that I can tell if the rename function succeeded, without the error message?
Is this the correct way?
error_reporting(0);
if(rename('test/test1/','test/test1/test2/test1/')===true){
print 'true';
} else{
print 'false';
}