Recommend this page to a friend! |
![]() ![]() |
Info | ![]() |
![]() |
![]() ![]() |
Reputation | Support forum | Blog | Links |
Ratings | Unique User Downloads | Download Rankings | ||||
Not enough user ratings | Total: 258 | All time: 7,707 This week: 450![]() |
Version | License | PHP version | Categories | |||
fphp_loader 1.9 | GNU General Publi... | 5 | PHP 5, Files and Folders, Language |
Description | Author | ||||||||
This class can load one or more PHP scripts from a directory. |
|
Links: PHP Classes and Github
Class of autoload was based on PSR standards to import the classes.
Split the main class FPHP_Loader
in two: ClassLoader
and FileLoader
.
___
This class loader files from direct paths, or folder path. The class supports multiple file name extensions to check and defaults to .php . The script files can be loaded with either include or require.
___
/php/
|__ autoload.php
|__ /fphp/
| |__ /loader/
| |__ ClassLoader.php
| |__ FileLoader.php
| |__ ErrorParserLoader.php
|__ /example/
/example/
|__ index.file.loader.php [e.g. FileLoader]
|__ index.class.loader.php [e.g. ClassLoader]
___
Require autoload and call the classes
require('./php/autoload.php');
use \Example\SuperHero as IronMan;
IronMan::says();
Require autoload and call the classes
require('./php/autoload.php');
use \FPHP_Loader\FileLoader;
$ext = ['html', 'htm'];
$loader = new FileLoader();
$loader->add_extensions($ext);
$loader->load_file('header.php');
$loader->load_dir('content/');
___
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
100% |
|
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.