PmWiki: BasicVariables

<< | Variables | LayoutVariables >>

These are some basic configuration variables for PmWiki. Normally these variables are set in your local/config.php file (see LocalCustomizations).

$ScriptUrl
The url that is used to access pmwiki.php on your server. PmWiki normally sets the value of this variable based on server environment variables, but you may need to set it explicitly (e.g. if you change PmWiki URL):
        $ScriptUrl = 'http://server.com/pmwiki/pmwiki.php';

$PubDirUrl
The url that is used to access the pub/ directory that is part of your PmWiki distribution, containing CSS and other files that need to be available to a browser. Normally determined from the server's environment variables, but you may need to set it explicitly if the default isn't correct.
        $PubDirUrl = 'http://server.com/pub';

$WikiTitle
The name of the wiki. Defaults to "PmWiki" but you can change this to almost any name you wish.
        $WikiTitle = 'SuperWiki';

$DefaultPasswords
The array of site-wide passwords to be used if no password has been set for a group or page (see Passwords and PasswordsAdmin). All default passwords are empty except for the 'admin' password. Each entry in $DefaultPasswords can also be an array of accepted passwords.
        $DefaultPasswords['admin'] = '1WUbGMq.PbUEk';
        $DefaultPasswords['edit'] = 
          array('1WUbGMq.PbUEk',WIZ2DVQpQprf2');

$AuthRealmFmt
Sets the value of the "realm" authentication parameter used in HTTP Basic authentication for PmWiki. By default this is set to '$WikiTitle', which means one realm for the whole site.
        $AuthRealmFmt = '$Group';   # use a realm for each WikiGroup
        $AuthRealmFmt = '$PageName';    # per-page realm

$TimeFmt
The format to be used for formatting dates and times, based on PHP's strftime function and the current locale. See http://www.php.net/strftime for more details about available formats for this string.
        $TimeFmt = "%B %d, %Y, at %I:%M %p";    # default
        $TimeFmt = "%m/%d/%Y %H:%M";            # 02/17/2002 00:14

$DefaultGroup
The default WikiGroup for the site. Defaults to "Main".
        $DefaultGroup = 'Home';

$DefaultTitle
The default "home" page for a WikiGroup. Defaults to "HomePage", although PmWiki also allows the name of the group itself to be used as a home page for a group.
        $DefaultTitle = 'IndexPage';

$AuthorGroup
The WikiGroup for user profiles. Defaults to "Profiles".
        $AuthorGroup = 'Users';

$WikiDir
The directory where edited pages are stored. Defaults to "wiki.d" in the current directory, but you can set it to be any directory you want. Note that the webserver process generally must have write permissions to this directory.

$WikiLibDirs
An array of directories where page files are being stored. This usually consists of $WikiDir and "wikilib.d", but a WikiAdministrator can add more directories to the list and/or change the order in which directories are searched for page files. A page's contents is always read from the first directory in $WikiLibDirs that contains a page file matching the page's name.

$ForceMkdir
When PmWiki is about to create a directory (either to hold pages or uploads), it first performs some permissions and ownership checks to make sure that creating the directory will be "safe". Setting $ForceMkdir=1 will cause PmWiki to bypass these checks and just create the directory (if it can).

$Newline
is a string used to represent newlines in the page files. It is represented in octal notation. It can be anything but a newline or something that will occur in the markup text itself. Example:
        $Newline = "\262";                # default
        $Newline = "\376";                # sometimes a good value

本頁更新於 2004 年 04 月 03 日,08:06 AM