[Pmwiki-users] Need help ($UploadUrlFmt)

Knut Alboldt mailing
Sun Jun 20 02:27:59 CDT 2004


At 21:34 20.06.2004, you wrote:
>If I do this:
>
>global $UploadUrlFmt
>
>or this:
>
>$UploadUrlFmt = FmtPageName('$UploadUrlFmt', $pagename);
>
>I get this:
>
>./uploads
>
>Which, on my system, resolves to:
>
>localhost/wikis/default/index.php/Main/uploads
>
>which is a bad thing when I'm really trying to get it to resolve to:
>
>localhost/wikis/default/uploads/
>
>I can fix it by doing this:
>
>$UploadUrlFmt = preg_replace("#/[^/]*\$#", "/$UploadDir", $ScriptUrl, 1);
>
>But I was wondering if there is an easier/better way?  I don't like to 
>re-define PmWiki variables forcibly unless I have to.
>
>Thanks,
>
>Steven

I "fixed" this by setting $UploadDir in config.php to the full URL (in 
your  case /localhost/wikis/uploads), not relative to $ScriptUrl.

Knut 




More information about the pmwiki-users mailing list