Problem:
Posted: Thu Jan 30, 2003 1:14 pm
Ahoi
I'm coding a script ... i have a lil probleme
:
i want to read a file (with the file() function) and then search for an array element and delete this element from the array ... but i'm using a variable for the word that the elemnt has to be.... (the variable is $dat)
my code looks like this:
but now i'm stuckin :-/
can somebody help me plz ?
-thanks
I'm coding a script ... i have a lil probleme
i want to read a file (with the file() function) and then search for an array element and delete this element from the array ... but i'm using a variable for the word that the elemnt has to be.... (the variable is $dat)
my code looks like this:
Code: Select all
<? if($dat){
if(@unlink("upload/".$dat)){
$zahl = file("count.txt");
$zohl = $zahlї0]-1;
$z = fopen("count.txt","w");
fwrite($z,$zohl);
fclose($z);
$zahl2 = file("avas.txt");
# above does my probleme take place :-/ #
echo "The file $dat has been deleted!";
}else{
echo "Error: File has not been deleted!";
}can somebody help me plz ?
-thanks