Re: Embedding Perl
| From: | Terry Romine | Date: | Wed, 24 Oct 2001 20:23:06 +0000 |
| Subject: | Re: Embedding Perl | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-13688@lists.php.net to get a copy of this message | ||
Ok, I found snippets that talk about using either exec() or backticks. The problem is that it still doesn't call the perl script. Or at least doesn't seem to.
exec("convert-pdf.pl Blank.gif",$out);
echo(implode("\n",$out));
$out =
convert-pdf.pl Blank.gif;
echo($out);
If I run
perl convert-pdf.pl Blank.gif
from the shell, it responds with 135x105 and creates a secondary file. This is what the script is meant to do. Calling it in either of the example above, results in either an Array or nothing being displayed. No secondary file gets created.
On Wednesday, October 24, 2001, at 11:05 AM, Terry Romine wrote:
I have a small situation where it would be good to be able to embed a perl routing in a php script. Is this possible? Or do I need to pass control from php to a perl script and return? A quick synopsis would be (in pseudo code) <?php if($theFileType == "pdf" { // call convert.pl to get a thumbnail } else { // other file type processing } ?> Alternatively, is there a module that can take a pdf file and make a thumbnail of the first page? Thanks, Terry