Fopen() and WebDAV

software development


I’m trying to write a script that modifies a text file in a WebDAV-enabled, password protected (via htaccess) directory. I’m using fopen($filename, ‘ab’ ); but I can’t seem to figure out how to put the password for the directory through.

Can this be done?


Make sure you aren’t using the full URL with fopen(), because URL access is disabled.

Simon Jessey
Keystone Websites (business site) | si-blog (personal site with affiliate links)


Yeah, I figured that out when trying to pass the password via the traditional method.

Actually, I even have password protection turned off on the webDAV directory now and I still can’t open the file (permission denied). Is there any way to change the permissions on files/directories in a WebDAV directory since I don’t own it?