Jump to content

Please help, new to php.


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 post
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 post
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 post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...