Question:

I have installed XAMPP.i have written the php program on notepad. Where should i save n how should i run it?

by  |  earlier

0 LIKES UnLike

where should i save the php program n how should i run it?

 Tags:

   Report

2 ANSWERS


  1. the person before me is correct.

    If u have IIS  and ur using ur OWN computer , TURN IIS  OFF first before using Apache .

    1.Start up ur Web server ( Apache probably )  , if not started

    2.Make sure u saved ur PHP program as  a .PHP  file ( NOT as .TXT ) in the folder called htpdocs in ur XAMPP package

    To save it coorectly in notepad :

    File-> Save as -> ( in the dialoge  box that appears )

    Save As Type MUST be "ALL FILES "

    name ur file as

        fileName.php  

    3.Now open ur Web browser ( Firefox probably ) and u have two options :

    A) IF  u have ur own Internet  domain name , then type the domain the the address

    locator of Firefox . Example :

    if ur domain is foo.com and ur PHP file name is bar.php

    THEN type this in Firefox :

    www.foo/bar.php. u should see ur Web page

    B) if u using ur OWN PC for testing without having a domain , then

    type this in the address locator of ur Web browser  (assuming u saved ur php program as bar.php):

    www.localhost\bar.php

    This should show u ur Web page

    I hope this helps ...

    Good luck !


  2. find the httdocs folder in you XAMPP directory structure. you may make multiple folders inside HTTDOCS and reference them in your URL like this:

    localhost/myFolder/index.php

    So the file above is located in: xampp directory>httdocs>myFolder>index.php. Make sure XAMPP is running otherwise your php file will do nothing.

Question Stats

Latest activity: earlier.
This question has 2 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.