![]() Now open browser and paste this URL localhost/testfile.php and hit enter, you should see My First PHP Script message on your browser.Ĭongratulations! you have successfully installed XAMPP and created your first PHP Script, now you can start learning more about PHP and test it on your local machine. Open a notepad and paste the below code and save it with name testfile.php in the directory F:\xampp\htdocs\ Now you have successfully installed XAMPP, lets test it. I have clicked on them therefore it is showing now stop and Apache and MySQL is green which means, they are now started. I am assuming that you are using Windows system, this tutorial will follow the installing of XAMPP for Windows users, although MAC also follow the same procedure.Ĭlick here to download the latest version of XAMPPor you can also download it from here download it, simple install it and select default option to install and click ‘Next Button’, you will also need to choose the directory to install it, I prefer to not install in the drive where you installed Windows, keep it any other directory, in my case i installed it in F:/xampp, when the installation is complete, now open XAMPP and start Apache and MySQL by clicking on Start Button, see the below image. Perl is a high-level, dynamic programming language, mainly used in network programming, system admin, and etc. Most popular CMS WordPress also uses PHP and MySQL. PHP executes only Apache web server so you can not run it on your local machine without setting up Apache server on your local machine, you can install Apache server and PHP individually but i prefer to use XAMPP. It is open source and easy to learn, you can find thousands of resources to learn PHP free online, it works great with MySQL. PHP is a server-side scripting language that is used by the most popular websites such as WordPress and Facebook. MySQL is an open source and the world’s most famous database management system. ![]() MySQLĪlmost all the websites that are dynamic needs to store data for that purpose we uses a database. Apache is the most famous web server today, more than 50% websites using it. ![]() XAMPP stands for Cross-Platform (X), Apache (A), MySQL (M), PHP (P) and Perl (P). XAMPP is very simple and lightweight Apache distribution, i prefer to use it because you can install it any platform Windows, Linux or Mac.Īpache is a web server that processes PHP files and convert them into simple HTML and send it to the web browser of a user. Once it's done, you can just press the browser icon with any of your files and it will open on localhost.This is my first post on my AllPHPTricks blog so I would like to start with the beginning so even if you are not aware how to run PHP on your local machine you can do it just following this tutorial, let me introduce first XAMPP. If you're working with Dreamweaver you can simplify the testing process by setting up your local server as a testing server in your project settings. So the relative path is while the absolute path may be c:/webservices/apache/www If you look at the absolute path of this tutorial folder then it's just a subfolder of your webroot, which is itself located somewhere on your harddrive, but that doesn't matter for your localhost. If you have a project called "mytutorial" you can enter and the server will show you the index-file of your tutorial, etc. it can find there (in a customizable order). Your web server has a root directory which is Now if you type into your browser, your browser will be directed to this webroot and the server will serve any index.html, index.php, etc. ![]() All in all: it's just serving pages to your browser (the client). Some like PHP it first sends to the interpreter and then sends the rendered file to the browser. Your Apache is a web server meaning its main purpose is to serve HTML, PHP, ASP, etc. That's totally fine and that's what your Apache is there for. What you are proposing is a very common thing to do! You want to run your web application locally without uploading it to your host yet. Ok, thanks for the more specific info, ppl may remove their downvotes now.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |