Page 1 of 1

PHP Include

Posted: Sat 25. Nov 2006, 02:25
by djsclaus
hey guys, is there any way to PHP Include a file into an article?

Posted: Sat 25. Nov 2006, 10:05
by Oliver Georgi
{PHP:....myphp.php}

Oliver

Posted: Sun 26. Nov 2006, 05:47
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

Posted: Sun 26. Nov 2006, 09:01
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