I try to run a PHP page. But it always shows source code content after greater than symbol ( > ) until meet the ( ?> )
For example:
My Code is:
<?
require_once('includes/global.php');
include_once('includes/auth.php');
.... // bla bla bla
$stats = STATS::singleton();
$stats->parse_all();
$product = PRODUCT::singleton();
$product->getNewVersion();
$product->getInstalled();
?>
... // bla bla bla
And when I run the page, it will display on browser as below:
parse_all(); $product = PRODUCT::singleton(); $product->getNewVersion(); $product->getInstalled(); ?>
Before parse_all() is the greater than symbol. And it stops displaying code content until ?>
Thank you very much.
You need to put
<?phpin the beginning not<?if you don’t have short tags enabledIf you want short tags enabled you need to put this
short_open_tag=Onin yourphp.iniIf you don’t have access to your
php.iniyou can also do this in an.htaccesswith thisphp_flag short_open_tag onSee the link here for the explanation of short tags.