The task : to write an example script (or to describe an algorithm), which itself does nothing, but only connects the modules , and builds the whole system and these modules.
In PHP.
The task : to write an example script (or to describe an algorithm), which itself does nothing, but only connects the modules , and builds the whole system and these modules.
In PHP.
Yes Easy.
<?php $allowed_modules = array('user','catalog','pictures'); function __autoload($name){ if(in_array($name,$allowed_modules) && file_exists('/Modules/'.$name.'.php')){ require /Modules/'.$name.'.php'; }else{ header('HTTP/1.1 404 Not Found'); die('No such module'); } }
as an option, the allowed_modules can also be obtained using the search module of available modules.
Source: https://ru.stackoverflow.com/questions/131707/
All Articles