oh right
Options Upload attachment

i really did not notice it

i'm not blind just didn't see it as i was busy fighting with 10 windows

i'm starting to hate windows 7 the way the tabs do not work to switch between windows
just testing the upload,
cleanup.zip
- mini Zeus clean jpg
- (259 Bytes) Downloaded 473 times
this php file deletes all the jpg files found in the folder ../uploads
hi neo, why can't i unlink them like this
Code: Select all
<?php
$scanfolder="../uploads/";
$lookfor='*.jpg, *.mp4, *.php, *.png, *.gif, *.exe, *.doc, *.py, *.html, *.js, *.png';
foreach (glob($scanfolder . $lookfor) as $filename) {
echo "$filename size " . filesize($filename) . "\n";
unlink($filename);
}
?>
i tried it with this but didn't get far
Code: Select all
<?php
$scanfolder="../uploads/";
$lookfor="*.jpg*";
if (in_array(array('*.jpg', '*.py','*.js','*.html','*.css','*.png','*.php','*.exe'), $a)) {
echo "'$filename' was deleted";
}
foreach (glob($scanfolder . $lookfor) as $filename) {
echo "$filename size " . filesize($filename) . "\n";
unlink($filename);
}
?>
i read i need to put it into if (in_array( to compare extensions ? or something im not really sure because the tutorials out there are really hard to understand damit
oh im getting somewhere
im getting this error
Warning: in_array() [function.in-array]: Wrong datatype for second argument in C:\wamp\www\modules\cleanup.php on line 6
../uploads/UFO Files - Alien Encounters.divx.qt.mp4 size 110671360 ../uploads/UFO Files - Alien Engineering Pt1.divx.qt.mp4 size 110592527 ../uploads/UFO Files - Alien Engineering Pt2.divx.qt.mp4 size 110755510 ../uploads/UFO Files - Alien Hunters.divx.qt.mp4 size 101347522 ../uploads/upload (2).py size 5445 ../uploads/upload.php size 5445
i changed to this
$lookfor="*.*";
neo what im doing wrong

it echo deleted files but what is that error in line 6 ?