Re: Embedding Perl

From: Date: Wed, 24 Oct 2001 20:58:37 +0000
Subject: Re: Embedding Perl
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-13689@lists.php.net to get a copy of this message
You have to put the actual command in the exec or backticks as you would type it in your shell, not just the filename. So instead of $out = convert-pdf.pl Blank.gif; Try $out = perl convert-pdf.pl Blank.gif; Sheridan Saint-Michel Website Administrator FoxJet, an ITW Company www.foxjet.com ----- Original Message ----- From: "Terry Romine" <eatrom@blazing-trails.com> To: <php-db@lists.php.net> Sent: Wednesday, October 24, 2001 3:23 PM Subject: Re: [PHP-DB] Embedding Perl > 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 > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net > For additional commands, e-mail: php-db-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.db (#13689) next »