Jump to content


Photo

PHP Not Working Properly


  • Please log in to reply
2 replies to this topic

#1 s251984

s251984

    Newbie

  • New Members
  • Pip
  • 1 posts

Posted 21 October 2013 - 05:33 PM

Hi,

When I try to run phpinfo(), nothing is displayed in the browser. When I test with following code

 

<html>
 <body>
 <?php echo "<p>Hello World</p>"; ?>
 <?php echo ‘<p>Order processed</p>’;?>
 </body>
</html>

 

the output comes like this

 

Hello World"; ?> Order processed’;?>

 

Can you please help me to solve this issue?

 

Thanks in Advance

Jo



#2 mac_gyver

mac_gyver

    Advanced Member

  • Administrators
  • 2,376 posts

Posted 21 October 2013 - 05:37 PM

what url are you entering in your browser? it should be something like http://localhost/your_file_name.php

 

beyond that, how exactly did you obtain php and install it to run on your localhost web server? what is your localhost web server type?


multi-purpose programming fool and resident naysayer [We try not be negative in replies, but telling someone what they're doing wrong, while staying politically correct, isn't always going to happen.]

#3 requinix

requinix

    Hopeless Member

  • Moderators
  • 5,992 posts
  • LocationWA

Posted 21 October 2013 - 07:06 PM

You're also using smart quotes (around the "Order processed" message). Don't. Just regular "s and 's.
When in doubt, CHECK YOUR ERROR LOG




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Cheap Linux VPS from $5
SSD Storage, 30 day Guarantee
1 TB of BW, 100% Network Uptime

AlphaBit.com