[Pmwiki-users] WikiFarm and cookbook scripts

Ciaran ciaranj
Sat Jan 8 04:44:34 CST 2005


I believe this is a PHP 'issue'   as you're using a variable ($FarmD) 
 '$FarmD/Cookbook/skinchange.php' results in the string
$FarmD/Cookbook/skinchange.php

.... however ... (assuming the value of $FarmD is /usr/fish) 
"$FarmD/Cookbook/skinchange.php'" results in the string
/usr/fish/Cookbook/skinchange.php

This is because PHP (irc) only replaces variables in strings that are
defined within double quotes... there's also some other rules, I don't
think escape codes such as (\n) work within single quotes either...
sorry for my less than clear explanation I'm NOT a php programmer :)
 -Ciaran



On Sat, 8 Jan 2005 11:12:27 +0000, Hans Bracker <design at flutesong.net> wrote:
> I set up a wikifarm with pmwiki 2 beta 14.
> The farm installation has a cookbook directory.
> Now to load the scripts therein in farmconfig.php as in any local
> (field) config.php I had to use statements like:
> include_once("$FarmD/cookbook/skinchange.php");
> 
> The weird thing is that it had to be in " ... " quotes, single quotes
> do not work, whereas single quotes worked fine before and are the norm
> in all the cookbook scripts.
> 
> Why is it like this? And if it has to be it should be documented how
> to make cookbook scripts on a general farm level usuable for all the
> fields. I expected an inclusion in farmconfig.php would work just as
> it is in config.php, like:
> include_once('cookbook/skinchange.php');
> 
> Is there something else to declare so it can work?
> 
> thanks!
> 
> Best,
> ~Hans
> 
> --
> Pmwiki-users mailing list
> Pmwiki-users at pmichaud.com
> http://pmichaud.com/mailman/listinfo/pmwiki-users_pmichaud.com
> 


-- 
- Ciaran



More information about the pmwiki-users mailing list