Jump to content

Please help, new to php.


Rotinomx

Recommended Posts

At the beginning i thought that i should double click it to open it but it didn't work,i installed Apache and php, but i don't know anything about how to use them and even why i installed them, just followed the tutrial,so can you please explain to me what do i do because ... the php tutorial is extremely good like any other in w3schools,i am 13 years old and i got how to write scripts but not how to run them,so please explain how to.

Link to comment
Share on other sites

You only need to install Apache if you want to be able to test locally without uploading to another server. Apache is a web server, and you set up Apache with PHP because PHP normally runs on a web server. Apache isn't the only web server you can use with PHP. When you send a request to a web server for a PHP page then the server sees a configuration setting which says that .php files should be handled by PHP. So the web server gets the filename for the script you're requesting and passes the filename to PHP. PHP reads the code in the file and runs it, and sends the output back to the web server which sends it back to the browser. So PHP is set up to run via a web server, and the output of PHP goes to the browser (as HTML code or whatever else you want PHP to output). So, when you run a PHP script the way you do it is to open a browser and go to the URL of your script. If the web server is configured correctly with PHP then you'll see the output from PHP. Just installing Apache and PHP isn't enough, you also need to configure them both, and configure Apache to use PHP. http://www.php.net/manual/en/install.php You can also install a package that contains everything you need to run a PHP server, like WAMP or XAMPP.

Link to comment
Share on other sites

The URL starts with HTTP. The server installed on your computer can be referred to as localhost or the IP address 127.0.0.1. You can go to http://localhost/ to get to the home page for your web server, and it's going to point to a specific location in your hard drive where you installed the web server. You need to copy all of your files into that directory to access them through the server.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...