4 Replies - 3616 Views - Last Post: 05 February 2011 - 07:56 PM

#1 4th idiot  Icon User is offline

  • D.I.C Head

Reputation: -6
  • View blog
  • Posts: 73
  • Joined: 23-January 10

How to run .php files?

Posted 03 February 2011 - 06:26 AM

I have started learning about PHP from w3school.com website..
I have installed wamp2.0i server on my computer.I used store all php files in c:/wamp/www/ directory.
While running I do right click on file and open with firefox.But I am not getting output on browser.I can only see the entire code as same as written in notepad file.
Suggest me the way.
Is This A Good Question/Topic? 0
  • +

Replies To: How to run .php files?

#2 Dormilich  Icon User is offline

  • 痛覚残留
  • member icon

Reputation: 3530
  • View blog
  • Posts: 10,174
  • Joined: 08-June 10

Re: How to run .php files?

Posted 03 February 2011 - 06:31 AM

you have to run your files through the server, opening the files like that bypasses the PHP interpretor (since the browser canít process PHP)

i.e. http://localhost/path/to/file.php
Was This Post Helpful? 1
  • +
  • -

#3 creativecoding  Icon User is offline

  • Hash != Encryption
  • member icon


Reputation: 926
  • View blog
  • Posts: 3,205
  • Joined: 19-January 10

Re: How to run .php files?

Posted 03 February 2011 - 08:41 AM

I've never tried WAMP, but I know in XAMPP, it has a control panel where you can turn on/off different parts. You will need to make sure PHP is checked on.
Was This Post Helpful? 0
  • +
  • -

#4 chinchang  Icon User is offline

  • Indie Game Developer
  • member icon

Reputation: 192
  • View blog
  • Posts: 725
  • Joined: 22-December 08

Re: How to run .php files?

Posted 03 February 2011 - 10:53 AM

First of all dont save your php files directly in wamp/www folder. Make a separate folder for each of your project. Suppose its proj1. Save your php file in wamp/www/proj1.

Now run WAMP - it shows up in your system tray. Open your browser and type http://localhost/. The wamp page will open. Scroll below and you will see your proj1 folder. Click on it and run your php file.

This post has been edited by chinchang: 03 February 2011 - 10:55 AM

Was This Post Helpful? 0
  • +
  • -

#5 no2pencil  Icon User is online

  • Toubabo Koomi
  • member icon

Reputation: 5247
  • View blog
  • Posts: 27,071
  • Joined: 10-May 07

Re: How to run .php files?

Posted 05 February 2011 - 07:56 PM

** Topic in question is not PHP coding, Moving topic to Web Servers & Hosting **
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1