vendredi 29 mars 2019

Deploying php app with XAMPP on localhost

Environment: Windows 10.

I need to deploy a PHP app on my localhost. For this purpose, I have installed XAMPP following this tutorial.

After setting up XAMPP, For testing purposes, I created the folder "app002" at "XAMPP\htdocs" directory. I have put "index.php" file inside it, which contains the following code.

    <html>
<head><h1>First Programm</h1>
</head>

<body>
    <?php
        print "Runing my first programm in PHP."
    ?>
</body>
</html>

After this when I opened my Chrome browser and enter "localhost/app002/" into the address bar it shows me "Runing my first programm in PHP." inscription so everything is okay.

After that, I created a new folder "app001" at "XAMPP\htdocs" directory. But when I enter "localhost/app002/" I see this error 404.

Inside app001 folder index.php script contains code without any HTML tags.

Here is the app.




Aucun commentaire:

Enregistrer un commentaire