Date: 12/08/00
- Next message: andRie is: "[phplib] OOT : PDF==>DOC"
- Previous message: Dennis Gearon: "[phplib] directory listings"
- In reply to: Dennis Gearon: "[phplib] directory listings"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Fri, 8 Dec 2000, Dennis Gearon wrote:
> I'd like to do a directory listing on a linux machine and then put the
> filenames into a database table. This would be for *.jpgs.
>
> So that involves being able to call the <ls> function, pipe it to a
> file, open the file, parse out the information and write it to the
> database. Is this possible using any of the PHPLIB functions/objects?
>
phplib doesn't have this kind of functionailty directly, but php does:
http://www.php.net/manual/class.dir.php
http://www.php.net/manual/function.readdir.php
Then you can use phplib database classes to add / retrive data for the
images. You should also look into getimgsize() to get the image heights
and width for forming proper HTML.
http://www.php.net/manual/function.getimagesize.php
I think I posted a simple class for image data parsing (Size and type)
here a while back, check the archives at http://marc.theaimsgroup.com/
-n
........
nathan hruby
Webmaster: UGA Department of Drama and Theatre
Project Maintainer: phpSlash, Carousel
nhruby <email protected>
........
---------------------------------------------------------------------
To unsubscribe, e-mail: phplib-unsubscribe <email protected>
For additional commands, e-mail: phplib-help <email protected>
- Next message: andRie is: "[phplib] OOT : PDF==>DOC"
- Previous message: Dennis Gearon: "[phplib] directory listings"
- In reply to: Dennis Gearon: "[phplib] directory listings"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

