Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

php check chmod permissions for folder

Hello how can I check if a folder has permissions to be writable and readable via php.

I want to check for permissions for include and file_get/put_contents, too.

I'm creating test code to check for permissions.

like image 686
Alex Emilov Avatar asked Dec 09 '22 08:12

Alex Emilov


1 Answers

Check out is_writable och is_readable. They're tailored for exactly this.

like image 105
Emil Vikström Avatar answered Dec 11 '22 21:12

Emil Vikström