FireBird34 has asked for the wisdom of the Perl Monks concerning the following question:
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: PHP through PERL
by jarich (Curate) on Oct 03, 2002 at 03:05 UTC | |
to ) all the browser would receive is your PHP code verbatim, without it ever executing. Now there are really ugly ways that you might be able to get beyond that, such as using exec(), or system() and somehow ensuring you pass them all of what had been in STDIN, but I don't recommend them. File upload in Perl should be fairly OS-agnostic. There are lots of good nodes around the monastery that will answer your question, but here's one that I've written. If that doesn't work for you, let us know what the problems you have with it are. Alternately, of course, you can just write your upload script straight in PHP. mmm.... mixing PHP and CGI... it does tend to lead to maintainence headaches. Hope it helps. jarich | [reply] [d/l] [select] |
|
Re: PHP through PERL
by helgi (Hermit) on Oct 03, 2002 at 11:05 UTC | |
One main reason I'm using PHP, is because every PERL script I've tried to use for uploading, it has not worked on my server (Win32- Apache). Oh for chrissake. With a newish version of CGI.pm (version 2.47+, you do: and with older versions, you do: In both cases the contents of the file end up in $filecontents and can be printed to a local file or worked on directly or whatever.
--
Regards, | [reply] [d/l] [select] |
|
Re: PHP through PERL
by nutshell (Beadle) on Oct 03, 2002 at 04:05 UTC | |
Note - The below needs CRLF support to make it pretty much bug free.
UPDATE: You can get the above code in .txt format here! | [reply] [d/l] |