[pmwiki-devel] include php file in wiki page

Martin Fick mogulguy at yahoo.com
Wed Nov 15 13:48:15 CST 2006


--- "Harvey, Jesse" <Jesse.Harvey at xerox.com> wrote:

'include("/home/lla/public_html/pmwiki/ismdfield/tokens/tokens.php")';
> 
> And then edited the wiki page and called the markup:
> 	(:mywebservice:)
> 
> Unfortunately it appears as if the php is executed
> first and is placed above all wiki html.  

Ah, yes, this makes sense, I was not quite thinking
right.  You want to actually capture the PHP output of
the php file and insert it, not the return value of
some function in your php file (which would be a lot
easier).  

So this recipe didn't work?
http://www.pmwiki.org/wiki/Cookbook/IncludeUrl

Access your PHP file through http, the key being:
"Keep(implode('',file('http://pmwiki/ismdfield/tokens/tokens.php')))"

This might work for web services, but I imagine that
with regular html pages you would get extra <html>,
<body> and <head> tags along with an http header. 
Maybe you can simply filter those out after the file()
command?

-Martin



 
____________________________________________________________________________________
Sponsored Link

Compare mortgage rates for today. 
Get up to 5 free quotes. 
Www2.nextag.com



More information about the pmwiki-devel mailing list