PHP Include

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
Post Reply
djsclaus
Posts: 3
Joined: Thu 23. Nov 2006, 22:23

PHP Include

Post by djsclaus »

hey guys, is there any way to PHP Include a file into an article?
User avatar
Oliver Georgi
Site Admin
Posts: 9906
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post by Oliver Georgi »

{PHP:....myphp.php}

Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
rescamilla
Posts: 69
Joined: Sun 25. Jul 2004, 01:53

Post by rescamilla »

{PHP:....myphp.php}
That works, but what about the REQUIRES in the php file that is being called up? They don't seem to get processed.
-Ray
User avatar
Oliver Georgi
Site Admin
Posts: 9906
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post by Oliver Georgi »

oh yes, it will also load all include or require files you have defined. But think about the path - use PHPWCMS_ROOT as base path. Such {PHP...} is used like a function - o you have develope as it is one - think about global vars and so on. Your php script can access phpwcms' vars by $_GLOBALS. Don't redefine a db connection - it is always opened in $_GLOBALS['db']

Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
Post Reply