2

I have a page, where there is a script in the footer.

<?php
    require_once('../autoloader.php');
    $feed = new SimplePie();
    $feed->set_feed_url('http://simplepie.org/blog/feed/');
    ...
?>

Then when I upload it to the server, I get this shown:

set_feed_url('http://simplepie.org/blog/feed/'); $feed->init(); $feed->handle_content_type(); print 'test'; ?> 

I have a phpBB forum installed as well, it works like charm. So > works like ?> in my code. I have no more php on that page, and commenting out the line does not help at all. Also I tried to add echo and print, but it did not work. So the PHP Version 5.2.17 is running... I have no idea what the problem is and how to solve it... Help me, please.

P.S. I know this thing will fix it half the way:

<?php
    require_once('../autoloader.php');
    $feed = new SimplePie();

    $function = set_feed_url('http://simplepie.org/blog/feed/');
    call_user_func(array($feed), $function);

    $function = init();
    call_user_func(array($feed), $function);

    $function = handle_content_type();
    call_user_func(array($feed), $function);
?>

1 Answer 1

5

It sounds like PHP is not running on the file at all, and the browser is interpreting <?php blah > as an unknown tag.

Sign up to request clarification or add additional context in comments.

1 Comment

i am so dumb :P I have .html extension on the file. Thanks.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.