Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Beginning PHP Beginning-level PHP discussions. More advanced coders should post to the Pro PHP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning PHP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 30th, 2008, 01:41 PM
Registered User
 
Join Date: Aug 2008
Location: vasco, goa, India.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default jus learnin

i have just started learning php. i have installed xampp on my pc. after i write a program in notepad where should i save it? and how should i run it to get the output?
could somebody please explain in detail. i have just started learning php, i don't know anything about it

m29
 
Old August 30th, 2008, 04:01 PM
Registered User
 
Join Date: Aug 2008
Location: Boise, Idaho, USA.
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi m29

I assume an expert will get you squared away soon, but I thought it would be fun to help with a little more understanding than you seem to have now.

I don't know what is xamp, but if you plan to write PHP on your own computer and also test what it does on your own computer, then you need to install PHP in a way that it works together with a web server right there on your computer. Once you have that installed and running properly, then you would save the web pages you write with notepad (or other software) in a folder wherever you want. But you would want to pick a folder which you have told your webserver to serve as your "local" website. Then you just open that page in your web browser just as if that was a website on the internet, only it actually lives on your own machine. You put the PHP code right into your webpage and simply put the address of that page into your web browser. The way it is all set up on my mac, I can access my local PHP driven "website" by either of 2 addresses:
http://192.168.1.100/
(the IP address of this (my) computer)
or
http://mylocaltests/
this latter address works because I told my webserver Apache (Apache comes already installed on new macs nowadays) to open the default page (index.html) whenever I type in "http://mylocaltests/".
The former address works even without any setup. All computers have an IP address (those numbers "192.168.1.100").

Step by step you will understand the needed things and get it running.

Good luck.

-Govinda

 
Old September 12th, 2008, 06:13 AM
Authorized User
 
Join Date: Jul 2008
Location: , , India.
Posts: 18
Thanks: 0
Thanked 2 Times in 2 Posts
Default

1. you should save your file at your_drive://xampp/htdocs/
Example: c://xampp/htdocs

2. open a web browser and type http://localhost/your_file_name.php









Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.