note 91900 rejected from function.include by thiago

From: Date: Wed, 01 Jul 2009 12:20:56 +0000
Subject: note 91900 rejected from function.include by thiago
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-157763@lists.php.net to get a copy of this message
Note Submitter: ironsky at yahoo dot com ---- when i make function like <? function cacheConfig() { GLOBAL $DB,$PATH_CACHE; $file_path = $PATH_CACHE.DS.'DB_Cache_Config.php'; if(!file_exists($file_path)) { $file_data = "<?php \n\n // Cache Config Settings \n\n"; $INFO = $DB->Query("SELECT * FROM #_config"); while($CONFIG = $DB->FetchArray($INFO)) { $varName = explode(".",$CONFIG['varName']); $file_data .= "\$Config['$varName[0]']['$varName[1]'] = \"$CONFIG[Value]\"; \n"; } $file_data .= " \n\n ?>"; SaveIt($file_data,$file_path); } include($file_path); } ?> i execute function in "index.php" and then i call var from "DB_Cache_Config.php" it say that the var didn't exists what i should do to make it right

« previous php.notes (#157763) next »