| re: Zip file processing without recompiling PHP
Andy wrote:
[...][color=blue]
> a minimum I would prefer not to have the client recompile PHP with zip
> support.[/color]
Why would any client (whatever you mean by "client") need PHP when running
Perl to begin with?
[color=blue]
> Does anyone know of a module that will parse zip files without any
> prerequisites?[/color]
Did you check CPAN.org? What does a search for ZIP return?
Or just do a plain "perldoc Archive::ZIP", it might even be installed
already.
[color=blue]
> I have searched google and usenet and not found anything useful.
> Everything seems to point to the Zip module which requires ZZiplib and
> recompilation of the PHP interpreter.[/color]
Again, what does Perl have to do with PHP?
[color=blue]
> Also, is there any function that can be used to create a temp
> directory with a unique name (equivalent of tempnam)?[/color]
Is there anything wrong with "mkdir()", details see "perldoc -f mkdir"?
And as far as temporary file names go: "perldoc -q temp" has some
interesting insights and suggestions.
[color=blue]
> I would imagine
> that there are security concerns involved in creating a tempnam file,
> unlinking it and recreating a directory with the filename returned,
> although this would be preferred to some other method of creating a
> directory.[/color]
No idea what you are talking about. Why would you want to create a file
first, delete it, and then create a temp directory with the same name?
Anything wrong with creating the directory right away? After all,
directories are nothing but files in a special format.
jue |