Click to See Complete Forum and Search --> : where to save my first php code??


php beginner
03-06-2006, 12:20 PM
hi all
i have just downloaded php + mysql and wrote a few lines in a notepad file and i stored it .php
my browser wont find
i wonder where am i supposed to save it?


thanx 4 ur time :)

shritesh
03-06-2006, 12:25 PM
I understand that you have installed a apache or iis server configured with php

save your file In Document Root of you server

and you will access it.

for eg.
if you document root is D:\websites or \websites in LINUX

then you will access it via
http://localhost/filename.php

Hope you find this usefull

php beginner
03-06-2006, 12:36 PM
thanx shritesh
when i start apache it shows this path on screen c:/apache/logs/httpd.pid

i tried saving my file on c:/apache/logs/ but still no luck :(

NogDog
03-06-2006, 12:51 PM
Under your apache install directory, look for a directory named "htdocs" which is usually thedefault name. Save your pages in that directory or in any subdirectories you want to create under it. To view the page, "http://localhost/page.php" will display it if it's in the htdocs directory, or "http://localhost/subdirectory/page.php" if you put it in a subdirectory of htdocs.

shritesh
03-08-2006, 12:57 AM
If the above doent solve you question. do this

Open the apache folder in it there will a conf directory open the httpd.conf file and search for DocumentRoot you will find your document root then save your files there and that's it

Hope this will help you
Shritesh