Managing Index File and Web Folders
Home Courses Community Support
Managing Index File and Web Folders

Congrats!! You are at web development module. It means you have learned the basics of PHP for beginners. Now we will teach you how to develop the website using PHP. Initial process to create the webpages in PHP is similar as HTML excluding coding standard and pages' extension.

Let's start from very beginning. To develop a PHP website, create a forlder first. And give it name of your website. For example, I have created a folder with name myweb in htdocs folder of xampp server. The path of my website at local server will be http://localhost/myweb.

Now your web folder has been created and you know the URL by which you will access it from local host. What is next? Which page will be called when you will type your web URL?

Index page or home page will be called. So you need to create this page first. create your php page by the name of index.php or home.php (whatever you like). Initially server will look for index.php and if this page will not found then it will look for home.php.

Right now we are just creating the page, not creating it's layout. So you can use below code to create that page.

echo "This is my first web page.";

Now, by typing your web URL you will get a page with text, "This is my first web page."

Create other required pages (i.e. about.php, contact.php) in same way. All these page will be of first level in URL depth. Apart from this, your website will have images, and you will require to write CSS to set the layout for your web pages. So create a folder for images and CSS too. Now you need to save all your images in images folder and CSS files in CSS folder. Create other folders as per the requirement.

enlightenedWe can save images, CSS files and JavaScript files in main directory too, but it is not a good practice because it will mash your web pages with other files and images.

Now your web folder will look like this-


In next heading we will learn how to create web pages. To make the course easy to you, we will just create home page and contact page.

← Preview

Array Sorting

Next →

Managing Web Layout


Our mission is to provide highly effective and quality education via innovative solutions. Geeksdemy look forward to bridge the gap between in-demand technology and academics in order to deliver innovative, easy, interesting and affordable learning across the Globe.


  • Python
  • Game Development with Unity 3D
  • Arduino
  • PCB & Circuit Designing
  • Robotics and Embedded C
  • 8051/8052 Embedded Systems
  • QuadCopter & UAV
  • MATLAB with Robotics
  • Raspberry Pi
Learn On the Go!
Get the Android App
Get the iOS App