Quote:
Originally Posted by DaveS
Hi I'm trying to run a few tests to understand how I might attempt something more complex.
I have a php include file but whenever I include it the file is getting outputted without actually being interpreted.
The include file is outside of the main forum
So e.g. a have a php template. In the PHP Include section I have: include("/file/path/www/links/lwt_links.php");
In that file I have the following PHP code.
PHP Code:
function lwt_test() { echo "test"; } echo "test2";
If I run the template it just outputs the code directly in the browser it doesn't get interpreted.
Any help appreciated. And it's a fantastic mod I've been using it for a long time.
|
You shouldn't use any echo commands in phpinclude section because this section is "processed" before outputting wt content so if you have an echo command there, it will also pasted before the wt content. Compile its content in a variable like:
PHP Code:
$myvariable = "test2";
and then use $myvariable in your wt content to paste it in the correct time.