2
我有一個頁面,頁腳中有一個腳本。php「>」沒有問號的行爲就像「?>」
<?php
require_once('../autoloader.php');
$feed = new SimplePie();
$feed->set_feed_url('http://simplepie.org/blog/feed/');
...
?>
然後當我把它上傳到服務器上,我得到這個圖所示:
set_feed_url('http://simplepie.org/blog/feed/'); $feed->init(); $feed->handle_content_type(); print 'test'; ?>
我已經安裝了phpBB論壇,以及,它就像魅力。所以>在我的代碼中就像?>一樣。我在該頁面上沒有更多的PHP,並且註釋掉該行並沒有任何幫助。此外,我試圖添加回聲和打印,但它沒有奏效。所以PHP版本5.2.17正在運行......我不知道問題是什麼以及如何解決它...請幫助我。
P.S.我知道這件事情會解決它一半的方式:
<?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);
?>
我很愚蠢:P我有.html文件的擴展名。謝謝。 – Xeos