[pmwiki-users] index.php

Thomas -Balu- Walter list+pmwiki-users at b-a-l-u.de
Fri Jul 22 15:12:46 CDT 2005


On Wed, Jul 20, 2005 at 06:17:50PM -0500, Patrick R. Michaud wrote:
> I've been thinking about adding an "index.php" file into the distribution--
> is this a good idea or a bad one?
> 
> If we don't want index.php in the distribution by default, then how 
> about an index.php-sample that has what index.php probably *should* 
> look like, so that people won't just rename pmwiki.php (as they tend to 
> do now)?

Just a quick note - since I don't know if I mentioned that here already.
I don't like having all the pmwiki stuff directly in my webservers root,
so I worked around that using a pmwiki subdirectory + index.php:

(from http://www.pmwiki.org/index.php/Profiles/Balu):
 
 <?php
 chdir('pmwiki');
 require_once('pmwiki.php');
 ?>

This allows me to have all pmwiki stuff in the pmwiki subdirectory while
the pmwiki pages are still available using the index.php in the
webservers root.

To make this work the file local/config.php also has to be
created/updated. It needs a modified $PubDirUrl so links to CSS or
template images are created correctly:

 $PubDirUrl = 'http://www.example.com/pmwiki/pub';

If you $EnableUpload, you also need to set the $UploadUrlFmt:

 $UploadUrlFmt = 'http://www.example.com/pmwiki/$UploadDir';

     Balu




More information about the pmwiki-users mailing list