Foren-Übersicht PHP Autoload

PHP Autoload

Beitrag 26.01.2007 15:12
elexis_linux Site Admin

Beiträge: 396
Website: http://ModernHosting.ch

Code: Alles auswählen

<?php /* This file is available in each module per symbolic link. ******************************** ATTENTION: *********************************** * FOR DEVELOPMENT YOU HAVE TO COPY THIS FILE IN EVERY MODULE * * AND CHANGE THE PATH TO YOUR SYSTEM ENVIROMENT BECAUSE WE DON'T WANT * * SYMBOLIC LINKS IN CVS. * ******************************************************************************* */ //include this files with constant definitions and therefor make them available in //every file where autoload.php is included require_once('../../../lib/customize.php'); //for development change this path to your environment require_once('../../../lib/common.php'); //for development change this path to your environment function __autoload($class_name) { /* $config = array(); if (file_exists($config_file = str_replace('autoload.php','server.conf',__FILE__))) { $config = parse_ini_file($config_file, TRUE); } */ $file_name = ROOT_PATH.strtolower(str_replace('_','/',$class_name)).'.php'; require_once($file_name); } ?>

4 poziom opinie

Zurück zu „PHP Programmieren“



Wer ist online?

Mitglieder in diesem Forum: Bot und 1 Gast