I just downloaded PHP, but I am having trouble finding where to write my code. I found a website said to use php-cgi.exe. Is this right, because I can't figure out how to save nor display the code and output.

Recommended Answers

All 5 Replies

depends on your php server, like WAMP you save your .php file in the "www" folder, or if you use XAMPP you save it in the "htdocs" folder.

You Can Download this programmer
and install it
now when you install it you will find folder with the name appserv
under the folder of appserv you will find folder with name www
tou can write your code in it

Now what I like about AppServer is that it automatically goes online anytime you restart. I guess there ways of configuring WAMP and XAMPP to start auto but I jus dont know how or maybe I dont care. Anyway, Csoft, I am guessing u are on windows and u have notepad already, jus open up notepad and type the following:


Save this file with any name and save it in ur root directory(depends on ur webserver as Vaultdweller said, so u figure out what and where it is and save the file in). Mostly, these directories are in the local drive eg C:/wamp, C:/Xampp, C:/program files/appserver. After u have saved the file at the www root or htdocs of ur webserver, jus open up ur browser and type; localhost/yourfile.php and hit enter. U should see some info on ur PHP installation.
Have fun coding.

I currently have Abyss web server. Does anyone have any advice for that server?

I will try advice for AppServer. Thank you both for the info. I'll keep you posted on how it goes.

Member Avatar

Install XAMPP its a opensource and simple to install. you have inbuild PHP latest version, MYSQL, Control Panel to start and stop the services. Simple to configure.


After installed, just open your browser and type http://localhost if it automatically shows a page php admin then success.

Create a simple php file in any editor with the following command. find the htdocs folder in the c:\xampp and place your files within a folder inside htdocs.



 echo "I successfully installed and executed the php file"

hope this helps.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.