Page 1 of 1

PHP Code doesn't work?!

Posted: Sun 23. Jul 2006, 09:57
by Rahner
Nice error, when I put in my include code into an article.

Code: Select all

Parse error: parse error, unexpected '&' in /srv/www/htdocs/web4/html/portal/include/inc_front/front.func.inc.php(2601) : eval()'d code on line 1
How can i fix this?
PS: I turned on "allow_cntPHP_rt"!

Posted: Sun 23. Jul 2006, 13:00
by DeXXus
How about showing the syntax you used! Was it a just "including" something like this:

Code: Select all

'http://www.yourdomain.com/filename.php?foo=1&bar=2'
I presume you wrapped this in [PHP][/PHP] tags. Did you try it as a straight <?php -snippet- ?>

Posted: Sun 23. Jul 2006, 15:56
by Rahner
I include with
<?php include( '/srv/www/htdocs/web4/html/x/include_this/x.php'); ?>
And only this code appears...

Posted: Sun 23. Jul 2006, 16:50
by juergen
Hi Rahner,

give it a try:

Code: Select all

[PHP]
include( '/srv/www/htdocs/web4/html/x/include_this/x.php');
[/PHP]
Not shure if other errors will appear, depends on what is included in your file.. for small job this might work

Jürgen

Posted: Sun 23. Jul 2006, 17:44
by Rahner
Then:

Code: Select all

Error in query:SELECT * FROM phpwcms_fonts ORDER BY font_name
...

Posted: Sun 23. Jul 2006, 18:32
by juergen
I forgot :

{PHP:x.php} and put x.php in frontend render ....

In case you are working with phpwcms in x.php this has to be included like modul or like contentpart.

Diificult ;)

Posted: Sun 23. Jul 2006, 22:05
by Rahner
Nice, its working, but on the wrong place...my news script is on top of the page and not where I put in the article...

Posted: Sun 23. Jul 2006, 22:43
by DeXXus
Instead of putting it in frontend render... How about trying:

Code: Select all

{PHP:/srv/www/htdocs/web4/html/x/include_this/x.php}
-OR-

Code: Select all

{URL:http://www.yourdomain.de/path/to/include_this/x.php}

Posted: Mon 24. Jul 2006, 10:20
by Rahner
Its the same: It works, too, but over my page and not in the article...
I want it to appear in the article, where i have written the code...

Posted: Mon 24. Jul 2006, 10:26
by Rahner
It's working on the right place now, but the script is making dumb actions :?