| Posted by Rik on 07/24/07 21:13 
On Tue, 24 Jul 2007 23:04:46 +0200, Jean Pierre Daviau <Once@WasEno.ugh>==
 
 wrote:
 > global $autoexec;
 > $autoexec =3D "C:\backJP\autoexec.bat";
 
 > --- snip ----
 >
 > require_once('paths.inc');
 > function updateFichier(){
 >   if (!$myBool =3D fopen ($autoexec, "a")) {
 >    echo "Cant create($autoexec)";
 >    exit;
 > }
 >
 > The include file is printed on screen
 > The function exit with     Cant create the file
 >
 > If  I write
 > function updateFichier(){
 > global $autoexec;
 > $autoexec =3D "autoexec.bat";
 
 This last line is not neccesary
 
 > ......
 > it works  . . .
 
 You obviously missed something in scopes. I suggest you read up on it:
 <http://www.php.net/global>
 
 This very example is explained over there.
 -- =
 
 Rik Wasmus
  Navigation: [Reply to this message] |