php code showing in browser?

hasanabis

New member
hi. i wanted to ask y my php code is being displayed in the browser , as i have wrtten it in the file. It is not working. i have installed the xampp which configures all by itself. all the status are showing activated then y is this happening. someone please help , i have been stuck on this for a week now. pl plz plzzzzzzzz help.
 
I guess.... and this is only a guess since many thing looks possible to the cause to your problem.

I 've tried to install xampp and it works quite well in my comp as well. So, most probably the problem lies in the way how you write your php code. Why dont you bring it here?

Critical point to check in php:

Does it start with "<?php" and ends with "?>" tag ?
does every line of the code ends with semicolon ";" ?
etc. etc...


rgrds
 
I guess.... and this is only a guess since many thing looks possible to the cause to your problem.

I 've tried to install xampp and it works quite well in my comp as well. So, most probably the problem lies in the way how you write your php code. Why dont you bring it here?

Critical point to check in php:

Does it start with "<?php" and ends with "?>" tag ?
does every line of the code ends with semicolon ";" ?
etc. etc...


rgrds
 
If you're running xampp on your own PC, make sure the file is in the correct directory. Also navigate TO the page. If it's at your root drive in a folder called "PHP" you'll navigate your browser to localhost/PHP, you cannot just directly open the file.

Also, if you're using PHP5, use <?php to start the PHP parsing, don't use the short tag (<?).
 
Back
Top