I guess that someone posted a good script to browse through the contents of
a specified directory and browse through it. Search through the archives for
the last week or so and you shoudl land up with it. If you don't write baxck
to me. I have a similar script that I wrote but I need to search for it. I
will send that to you. The script does eactly what you want -filesystem
manipulation after database matching.

Also, to limit the filesize for uploaded files, take a look at the uploading
files section  of trhe php manual

http://www.php.net/manual/en/features.file-upload.php

there are good code snippets to achieve this.

hope that helps

best regards

Ankur Verma
HCL Technologies
A1CD, Sec -16
Noida, UP
India

----- Original Message -----
From: "Kenneth R Zink II" <[EMAIL PROTECTED]>
To: "PHP" <[EMAIL PROTECTED]>
Sent: Wednesday, February 14, 2001 11:30 PM
Subject: [PHP] how do I do file maintenance with PHP?


Ok here is the deal.

I have a Linux server running PHP4 and MySQL and a directory full of images.

The images that are currently being used should be listed in a table
(members) in a column titled "pic1".  What is the best way to pull the file
names of the files and check them against the files in the table?  I want
all files that are not listed in the table to be deleted.

Also, is there a way to limit file size?  I don't want new images to be
accepted if they exceed 250k.  It takes too long for images to display if
they are larger then that.


Thanks in advance for any help.

Kenneth R Zink II     [EMAIL PROTECTED]    ICQ# 5095094
'87 2.8L TBI GMC S-15 Ext. Cab (Hurricane) ...524 in the works !!!
http://www.s-series.org/htm/windstorm/project-windstorm.htm
'85 3.4L Carbed Chevy S-10 Blazer (FireStorm) ...Soon to be 3.4L SFI DIS !!!
http://www.s-series.org/htm/firestorm/firestorm.htm
Racing by the Grace of God!!



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to