|
Posted by brett on 11/11/06 22:03
> You want to use eval(), here is the entry on the on-line PHP manual (a
> great reference for PHP coding):
I still can't get this to work. There are three files involved. The
chain starts here:
LinkGuide.php --
<a href="www.abc.com/page1">Some Link</a> (abc)
somefile.php --
Here's the link from LinkGuide:
<?php $content = file_get_contents(TEMPLATEPATH . '/LinkGuide.php');
echo $content; }
?>
header.php --
Finally, here's the two files from above:
<?php
$content = file_get_contents(TEMPLATEPATH . '/somefile.php');
echo eval("$content");
?>
I get this error:
Parse error: syntax error, unexpected T_STRING in
d:\home\blog\wp-content\themes\default\header.php(111) : eval()'d code
on line 1
Any suggestions?
Thanks again,
Brett
Navigation:
[Reply to this message]
|