note 80000 rejected from function.include by mgf

From: Date: Wed, 18 Jun 2008 08:41:17 +0000
Subject: note 80000 rejected from function.include by mgf
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-140555@lists.php.net to get a copy of this message
Note Submitter: rumkin at yandex dot ru ---- Hi i've got such problem: <?php function my_include($file_path){ //... include($file_path); //... } ?> but when file from $file_path included my variables became undefined. But they exist in $GLOBALS. Such way i couldn't get my variable to one script to another without using global keyword in included script. That's an example: file a.php: <?php $a = 1; my_include("./b.php"); ?> file b.php: <?php $b = $a + 1; //Notice Undefined variable: a //... ?> What I've got to do?

« previous php.notes (#140555) next »