Skip to content

ihebboussandel/StartNewPhpAppCoreBasic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

StartNewPhpAppCoreBasic

app architecture

  • includes
    -->classes (define all the classess of the app)
    -->config.php (define all settings of the app)
    -->bootstrap.php (inludes all classes and config file)
    -->functions (Dir Including Common functions that will be used whole site)

  • themes
    -->CSS
    -->JS

  • images

  • API (define libraries or SDK)

  • templates (global layout of the app)

How it works

for any new file always include bootstrap.php
require (dirname(__FILE__) . '/includes/bootstrap.php');

for any class ,no need to connect to db ,always start the new methode with global $db exemple:

function printUsers() //print all users on db
	{
		global $db;
		return $db->get('users'); // we use a prebuilt function from the MysqlDB class check out the documentation
	}

We use a prebuilt database class for fast implementation of function check out the documentation https://github.com/joshcam/PHP-MySQLi-Database-Class

themes

the theme path is defined as global vraible path in the config.php (default css,js are bootstrap files)
define("css_path", path."/themes/css/bootstrap.min.css"); Link to CSS file
<link rel="stylesheet" type="text/css" href=<?php echo css_path; ?>>

Templates

In this Dir you can define the default structure of the page header,footer,content .The default page is layout.php with css/js links.

Support ME

This software is developed during my free time and I will be glad if somebody will support me.
For another projects and articles visite my blog https://nodeme.blogspot.com/

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors