9 Replies - 2928 Views - Last Post: 17 September 2013 - 01:33 PM

#1 archie021  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 16-September 13

PHP Big Problem

Posted 16 September 2013 - 07:12 PM

Hi everyone, I created a very simple PHP file on my computer but when I open it to my browser, I get a white screen. Since I am still trying to open the PHP file, I made the file so simple as it can get, so I am sure that I know nothing is wrong with my PHP code which looks like this:

<?php
echo "Hello Archie";
?>

What should I do? Please help!

Cheers.
Is This A Good Question/Topic? 0
  • +

Replies To: PHP Big Problem

#2 modi123_1  Icon User is offline

  • Suitor #2
  • member icon



Reputation: 9258
  • View blog
  • Posts: 34,735
  • Joined: 12-June 08

Re: PHP Big Problem

Posted 16 September 2013 - 07:23 PM

What environment is it on? Is there a webserver (apache, IIS, etc) running that recognizes a localhost call and properly interprets it as a php page to react to?
Was This Post Helpful? 0
  • +
  • -

#3 archie021  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 16-September 13

Re: PHP Big Problem

Posted 16 September 2013 - 07:27 PM

its just a very basic file sir, I just save it on my desktop named try.php
Was This Post Helpful? 0
  • +
  • -

#4 modi123_1  Icon User is offline

  • Suitor #2
  • member icon



Reputation: 9258
  • View blog
  • Posts: 34,735
  • Joined: 12-June 08

Re: PHP Big Problem

Posted 16 September 2013 - 07:29 PM

okay dokey.. so your computer (what ever OS you are not telling me you are using) needs a webserver to be able to interpret that file and know it's php. If you don't the browser will just assume it's a plain ol' text file.
Was This Post Helpful? 0
  • +
  • -

#5 archie021  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 16-September 13

Re: PHP Big Problem

Posted 16 September 2013 - 07:39 PM

Im using Windows XP, No sir, I think I dont need webserver because I can see my file when I was on my school but not at home. I dont know... I just cant open a very simple PHP file w/o any database just an echo ONLY. please help :(
Was This Post Helpful? 0
  • +
  • -

#6 modi123_1  Icon User is offline

  • Suitor #2
  • member icon



Reputation: 9258
  • View blog
  • Posts: 34,735
  • Joined: 12-June 08

Re: PHP Big Problem

Posted 16 September 2013 - 07:43 PM

Again.. you need a websever of some sort to know how to interpret the PHP.

control panel -> admin tools -> IIS. Figure out if you have IIS installed and if so where it believes "localhost" directs to. (typically c:\inetpub)... then dump the file there and navigate the browser to "localhost/<your file name>".
Was This Post Helpful? 0
  • +
  • -

#7 archie021  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 16-September 13

Re: PHP Big Problem

Posted 16 September 2013 - 07:44 PM

ok sir I installed XAMPP but can you help me how to configure it. Thanks
Was This Post Helpful? 0
  • +
  • -

#8 modi123_1  Icon User is offline

  • Suitor #2
  • member icon



Reputation: 9258
  • View blog
  • Posts: 34,735
  • Joined: 12-June 08

Re: PHP Big Problem

Posted 16 September 2013 - 07:46 PM

Go to the XAMPP site and read how to install it there.. It's fairly involved but their steps are sound.
Was This Post Helpful? 0
  • +
  • -

#9 archie021  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 16-September 13

Re: PHP Big Problem

Posted 16 September 2013 - 07:47 PM

thank you so much sir. :bananaman:
Was This Post Helpful? 0
  • +
  • -

#10 no2pencil  Icon User is offline

  • Admiral Fancy Pants
  • member icon

Reputation: 5345
  • View blog
  • Posts: 27,296
  • Joined: 10-May 07

Re: PHP Big Problem

Posted 17 September 2013 - 01:33 PM

This isn't a question on php, as your code has no syntax errors.

** Moved to Web Servers & Hosting **
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1