Page 1 of 1
prolly need some sleep for ($i .....
Posted: Wed Apr 21, 2004 10:54 pm
by ol4pr0
Parse error: parse error, expecting `T_VARIABLE' or `'$'' in debug.php on line 115
Code: Select all
$ext = strrchr($file_name,'.');
if (($limit_ext == "yes") && (!in_array($ext,$extensions))) {
$endresult = "<font size="2">File is wrong type</font>";
}else{
for ($i=0; $i<$1000000; $i++) // line 115
{
@copy($file, "$absolute_path/$file_name[$i]")
or $endresult = "<font size="2">Couldn't Copy File To Server</font>";
}
Posted: Wed Apr 21, 2004 10:57 pm
by d3ad1ysp0rk
$1000000
Is that a variable?

Posted: Wed Apr 21, 2004 11:00 pm
by ol4pr0
lol... nope i need to rename the file.. with a number
however still doesnt work.. and yea i need some sleep ( realizing that some more now ..
Posted: Wed Apr 21, 2004 11:01 pm
by d3ad1ysp0rk
What error does it give you now?
Posted: Wed Apr 21, 2004 11:08 pm
by ol4pr0
NO error .. just doesnt rename the file
Posted: Thu Apr 22, 2004 2:23 am
by stoyan
Posted: Thu Apr 22, 2004 2:32 am
by Chris Corbyn
stoyan, that was pointed out in the first reply but even then, the errors stopped yes. Only problem was that the file doesn't get renamed.
How about....
Code: Select all
@copy($file, "$absolute_path/$file_name.$i")
To deal with the file rename problem. Are you just trying to append the number to the filename or completely rename it?
Posted: Thu Apr 22, 2004 2:36 am
by feyd
I'm having serious trouble understanding what the loop is for other than filling the server with that file..
Posted: Thu Apr 22, 2004 6:42 am
by magicrobotmonkey
lose the @ and see what error you get!
Posted: Thu Apr 22, 2004 6:58 am
by Wayne
Code: Select all
for ($i=0; $i<$1000000; $i++) // line 115
you cant do that .... if $1000000 is an actual variable you can't start its name with a number so make it $_1000000 ... if you want to use the value 1000000 than just put
Code: Select all
for ($i=0; $i<1000000; $i++) // line 115
Posted: Thu Apr 22, 2004 7:00 am
by magicrobotmonkey
I think thats been said a few times already...