Php Script displaying source on browser instead of executing it
Collapse
X
-
This is most probably your problem, you have to setup a server to accept shorthand code, if not it will be commented/printed to screen. General rule of thumb is to always start php code with <?php and NOT <?Originally posted by chelios View PostBrowser show source code if your php is not properly formated
BAD WAY TO FORMAT PHP,SOME SERVERS DO NOT RECOGNIZE FORMATING AND OUTPUTS SOURCE CODE
Corect way to do itPHP Code:<?
print "Bad formating";
?>
PHP Code:<?php
print "Corect formating";
?>
Leave a comment:
-
Browser show source code if your php is not properly formated
BAD WAY TO FORMAT PHP,SOME SERVERS DO NOT RECOGNIZE FORMATING AND OUTPUTS SOURCE CODE
Corect way to do itPHP Code:<?
print "Bad formating";
?>
PHP Code:<?php
print "Corect formating";
?>
Leave a comment:
-
without seeing the script and also not knowing exactly what the problem is - there is no way of helping apart from guessing
Leave a comment:
-
Php Script displaying source on browser instead of executing it
i was just testing a script i made, but it didn't display design or any html..
Instead, it showed all my codes in highlighted format. Meanwhile, some scripts work perfectly alright, but few still gives me problem..
Any help?Tags: None
Leave a comment: