Alex Emilov
Alex Emilov

Reputation: 1271

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.

Upvotes: 4

Views: 14328

Answers (2)

Emil Vikström
Emil Vikström

Reputation: 91983

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

Upvotes: 10

ArK
ArK

Reputation: 21066

did you try chmod() .

EDIT:Then try fileperms

Upvotes: 5

Related Questions