Publishing System Settings Logout Login Register
OOP PHP & MySQL Download System
TutorialCommentsThe AuthorReport Tutorial
Tutorial Avatar
Rating
Add to Favorites
Posted on April 20th, 2012
2551 views
PHP Coding
The index file

The index file is the first point, and only real contact that our possible users will access, there isn't a great deal of stuff in this file because the funcs.php file holds it all.

In the index.php file we created earlier, just put this code in it, it has some comments to explain which part of it does.

 

<?php
// Here I am loading the functions that we need.
include "funcs.php";
// Here I am generating the classes to be used.
$dlsys = new stdClass();
$dlsys->templates = new templates;
$dlsys->lib = new lib;
	
	// This will call the header template from the database.
	$dlsys->templates->head();
// This calls the switch function so that we can structure our links
$dlsys->lib->getswitch();
	// This will call the footer template from the database.
	$dlsys->templates->foot();
?>

 

Now save this file, and move onto the next chapter, The funcs file.

Next Page
Pages: 1 2 3 4 5
Dig this tutorial?
Thank the author by sending him a few P2L credits!

Send
Andy Rixon

My name is Andy Rixon and I have been into developing PHP and MySQL Application for about 5 years, I am still learning new things everyday.
View Full Profile Add as Friend Send PM
Pixel2Life Home Advanced Search Search Tutorial Index Publish Tutorials Community Forums Web Hosting P2L On Facebook P2L On Twitter P2L Feeds Tutorial Index Publish Tutorials Community Forums Web Hosting P2L On Facebook P2L On Twitter P2L Feeds Pixel2life Homepage Submit a Tutorial Publish a Tutorial Join our Forums P2L Marketplace Advertise on P2L P2L Website Hosting Help and FAQ Topsites Link Exchange P2L RSS Feeds P2L Sitemap Contact Us Privacy Statement Legal P2L Facebook Fanpage Follow us on Twitter P2L Studios Portal P2L Website Hosting Back to Top