- Create PHP Project Folder inside Drive
D exmaple: I create it in
D:/Project
- than Create index.php
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Hello World</title>
</head>
<body>
<h1><?php echo "Hello World"; ?></h1>
</body>
</html>
- Open XAMPP
- Click
Config
then clickApache (httpd.conf)
and Search forDocumentRoot
than you will see
DocumentRoot "C:\xampp\htdocs"
<Directory "C:\xampp\htdocs">
- then Replace it to your Directory of your Project Location
DocumentRoot "D:/Project"
<Directory "D:/Project">
- Restart your XAMPP server than run
localhost
or127.0.0.1
will see yourHello World
To custom Domain Name go to How to Change Domain Name on XAMPP From localhost or 127.0.0.1 to yourdomain.com
if you like this turtorial just Leave a Comment :) Thanks
Post a Comment