Re: variables empty

From: Date: Tue, 17 Apr 2001 14:29:31 +0000
Subject: Re: variables empty
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-48972@lists.php.net to get a copy of this message
hey, try this... $the_path = "/home/H0RNET/ftp/" . $jaar . "/" . $vak . "/"; unlink ($the_path . $d); ""Dennis Haller"" <dennis.haller@iie.nl> wrote in message news:9bharm$1td$1@toye.p.sourceforge.net... > Hi all, > I've got this problem with variables. In the code below I've got the > variables: $jaar and $vak, if I echo them they r displayed correctly, but if > the function unlink is called it doesnt seem to know what $jaar and $vak > are. If I do $the_path = "/home/H0RNET/ftp/jaar1/PRO/"; then the function > unlink works just fine. > Do I have to declare the 2 variables again? What is the problem here? > > Thx, > H0RNET > > > > > <?php > $the_path = "/home/H0RNET/ftp/$jaar/$vak/"; > > if ($d) > { > unlink ("$the_path$d"); > } > > > $handle = dir($the_path); > $upl = $upl."<table width=\"28%\" border=\"0\">"; > while ($file = $handle->read()) { > if (($file != ".") && ($file != "..")) { > $con = <<<giveup > <tr><td width="13%" height="2">$file</a> > </td><td width="87%" height="2"> > <a href="$PHP_SELF?d=$file">DELETE</a></td></tr> > giveup; > $upl = $upl."$con"; > } > } > $upl = $upl."</table>"; > > echo $upl; > ?> > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#48972) next »