[pmwiki-users] Include PHP Script in Page Markup

Gregory Martyn GMartyn at JudicialTitle.com
Thu Aug 10 12:42:35 CDT 2006

Cool; thanks. Your includephp markup is exactly what I was looking for.
Is there anything PmWiki can't do? :)


From: pmwiki-users-bounces at pmichaud.com on behalf of Patrick R. Michaud
Sent: Thu 8/10/2006 12:12 PM
To: Clemens Gruber
Cc: pmwiki-users at pmichaud.com
Subject: Re: [pmwiki-users] Include PHP Script in Page Markup

If you really want to include a php script directly, then perhaps
something like:

    function IncludePHP($pagename, $script) {
      $html = ob_get_contents();
      return $html;

    Markup('includephp', 'directives',
      '/\\(:includephp (.*?):\\)/e',
      "Keep(IncludePHP(\$pagename, '$1'))");

All of Balu's security concerns are correct -- as written here it
would be easy for a malicious author to do some nasty mischief.
This is just to give some idea of how to create the markup in the
first place.


All email sent to or from The Judicial Title Insurance Agency LLC corporate email system is subject to archival, monitoring and/or review by The Judicial Title Insurance Agency LLC personnel. The information contained in this electronic transmission is legally privileged and confidential information intended only for the use of the individual or entity named above. If the reader of this transmission is not the intended recipient, or an authorized representative of the recipient, you are hereby notified that any dissemination, distribution or copying of this transmission is strictly prohibited. If you have received this transmission in error, please notify the sender immediately by return email and delete the message and any attachments from your system.

More information about the pmwiki-users mailing list