require_once(); questions

From: Date: Sat, 07 Jul 2001 21:59:08 +0000
Subject: require_once(); questions
Groups: php.general 
Request: Send a blank email to php-general+get-56682@lists.php.net to get a copy of this message
Hi All, I have a function that includes files based on some SQL queries. On one of the first loaded files, I want to define a function and use it on another included file. Something like: includes file: first_file.inc.php This file has: $test = "Show me!"; Then include file: second_file.php This file has: echo $test; But doesn't show nothing, so I guess it is not possible to do. Am I right? If so, what's the best alternative? Also, another question.... since it is a function that includes the files, the contents of these files are not available outside the function scope.. what's the best way to use it outside the function? Thanks a lot.... -- Julio Nobrega. A hora está chegando: http://sourceforge.net/projects/toca

« previous php.general (#56682) next »