I have been writing a PHP code. As I couldn't execute it locally (installation issue), I moved it to my server as a '.php' file. I haven't executed or run a php file in server before. Can anyone please say me how I can view the output of my script in the browser please?


Just go to the page in the browser, the same way you would locally except replace localhost with the domain name.

Hi.. Thanks for the quick reply..
But when I am opening it, even now its showing me a blank page. No error nothing! It was the same what I was viewing back in my local machine also.

This is what I was trying to do..



    $query="SELECT * from example";


              echo "<b>Data</b><br><br><b>Users</b>";
              echo "$infofirstName $infolastName";


Right below # BEGIN SCRIPT place


Then follow the FAQ on the main page of the PHP forums


I paced the 'error_reporting(E_ALL);' ... but couldn't find the FAQ that you were saying about...


I paced the 'error_reporting(E_ALL);' ... but couldn't find the FAQ that you were saying about...

After you placed that in the code refresh the page. Instead of a white page you should see errors. If you get errors that mention something about a MySQL result resource follow the FAQ. If it is a different error post the error here.


Its the same.. thats what I was saying.. Its blank page still.


Also put

ini_set('display_errors', 'On');

Below error_reporting(E_ALL);
If you still don't see any errors it could be because you're trying to call a function which obviously does not exist ( XYZDBConnect() )


That worked.. Thanks..
It was the DB connection error. Let me try it once now..