开发者

XAMPP + Perl + PHP. Not sure how to run Perl script

This is very stupid but I seem to be completely lost trying to test a Perl command-line application with XAMPP. I downloaded the 'ExifTool by Phil Harvey' and extracted the files in a folder within htdocs with an index.php in it, in which I hope to set up a PHP interface to the functionalities provided by ExifTool. Actually I can't even run a simple "Hello World" Perl script to run from a PHP script and handle the output. I tried using shell_exec but not sure if I'm putting the right commands in. (./exiftool t/images/ExifTool.jpg, but the output is nothing.)

[I'm trying to开发者_JS百科 make a website where I can upload an image and have the exif info displayed with the help of ExifTool assuming ./exiftool -j t/images/ExifTool.jpg returns some nice JSON data. But I'm not sure how to get it to work to begin with :( Thanks.]


You have to add the perl interpreter to the string you pass to shell_exec(), exiftool itself won't be run directly.

If you just need to work with Exif data, you can use PHP direct support: http://php.net/manual/en/book.exif.php

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜