Claudio schrieb:
> I'm using PHP 5. I have a class operation that includes php files.
> Is there a way to include this files to global scope? So that difined vars
> and functions are global accesseble?
I know this problem from my early PHP days. If your problem is that you
want to include some c
the answer
cc wrote:
> yes, its possible, consider this:
>
> /**
> * @param $file_to_include path to php file you want to get its content
> * @return included contents
> */
> function get_output($file_to_include){
> ob_start();
> include $file_to_include;
> return ob_get_clean();
> }
is
cc wrote:
yes, its possible, consider this:
/**
* @param $file_to_include path to php file you want to get its content
* @return included contents
*/
function get_output($file_to_include){
ob_start();
include $file_to_include;
return ob_get_clean();
}
this will break if the included f
yes, its possible, consider this:
/**
* @param $file_to_include path to php file you want to get its content
* @return included contents
*/
function get_output($file_to_include){
ob_start();
include $file_to_include;
return ob_get_clean();
}
of course, you may extend this function to bet
4 matches
Mail list logo