[pmwiki-users] documentation for mkdirp()

Patrick R. Michaud pmichaud at pobox.com
Tue Aug 2 14:49:57 CDT 2005


On Tue, Aug 02, 2005 at 09:00:09AM +0200, Christophe David wrote:
> 
> >> Use PmWiki's mkdirp() function instead of mkdir() to create the
> directory.  >> This will make sure that the CurrentVisitors directory
> exists with the
> >> appropriate permissions (as well as prompt the administrator to create
> >> the directory if it's needed).
> 
> Could someone please document mkdirp() ?

I'm not in a spot at the moment where I can document this in PmWiki/Functions,
but here's a quick overview:

The mkdirp($dir) function creates a directory $dir if it doesn't already exist,
including any parent directories that may be needed.  For each
directory created, it checks that the permissions on the directory
are sufficient to allow PmWiki scripts to read and write files in that
directory.  This includes checking for restrictions imposed by PHP's
safe_mode setting.  If mkdirp() is unable to successfully create a 
read/write directory, mkdirp() aborts with an error message telling 
the administrator the steps to take to either create $dir manually or 
give PmWiki sufficient permissions to be able to do it.

Pm




More information about the pmwiki-users mailing list