The problem is that I downloaded a web page to my local server (via ftp).
Now the browser displays some code instead of a page.
The website is running on smarty templates, but that may or may not be the issue.
I tried to track the issue and what I know already is that the displayed code is a part from main index.php file and looks like this:
=$_var['time'] && $output[$x]['tags']['state'][0][0]==1){ $_out['box']['promotions'][]=$output[$x]; } } else if ($_GET['state'] == 1) { if($output[$x]['tags']['state'][1][1]<=$_var['time'] && $output[$x]['tags']['state'][1][2]>=$_var['time'] && $output[$x]['tags']['state'][1][0]==1){ $_out['box']['news'][]=$output[$x]; } } } $_out['prodlimit']['news'] = 24; $_out['prodlimit']['promotions'] = 24; } else { for($x=0;$x=$_var['time'] && $output[$x]['tags']['state'][0][0]==1){ $_out['box']['promotions'][]=$output[$x]; } if($output[$x]['tags']['state'][1][1]<=$_var['time'] && $output[$x]['tags']['state'][1][2]>=$_var['time'] && $output[$x]['tags']['state'][1][0]==1){ $_out['box']['news'][]=$output[$x]; } } $_out['prodlimit']['news'] = 12; $_out['prodlimit']['promotions'] = 4; } // filtry $query1="select * from ".$_base[prefix]."mod_assortment_filters order by category,position,id"; $result1=mysql_query($query1); while($dane1=mysql_fetch_assoc($result1)){ $query2="select * from ".$_base[prefix]."images where module='assortment_filters' && parent='$dane1[id]' order by id limit 0,1"; $result2=mysql_query($query2); if($dane2=mysql_fetch_assoc($result2)){ $dane1[logo]=$dane2; } $_out[filters][strtolower($dane1[category])][]=$dane1; } //print_r($_out[filters]); // slideshow $query="select * from ".$_base[prefix]."mod_component_files where name like 'Slideshow:%' && visible='1'"; $result=mysql_query($query); while($dane=mysql_fetch_assoc($result)){ $_out[slideshow][]=$dane; } // smarty $smarty->assign("_out",$_out); $smarty->assign("informations",$informations); $smarty->assign('content_cell', $content_cell); $smarty->display("index.tpl"); ?>
The part before it in the index.php file is:
if(isset($_GET['state'])) {
for($x=0;$x<count($output);$x++){
if ($_GET['state'] == 0) {
if($output[$x]['tags']['state'][0][1]<
There are also some variable declarations earlier.
Actually any changes have no effect until I change something in the index.php – which generally results in the less code displayed by the browser.
Could this be some php version differences between my local server and the web server (web-server has older php version I guess)?
I am clueless – I need this working so I could restyle it – it is a e-commerce web page with database etc..
Thanks in advance.
I found the solution. My php.ini was set to not allow short tag forms,