develooper Front page | | Postings from September 2008

Re: php perl integration

Thread Previous
David E. Wheeler
September 16, 2008 09:49
Re: php perl integration
Message ID:
On Sep 15, 2008, at 22:47, solo kihara wrote:

> <?php
> print "Hello from PHP!\n";
> $perl = new Perl();
> $perl->require("");
> print "Bye!\n";
> ?>
> it outputs the following:
> "Hello from PHP!
> *Fatal error*: Class 'Perl' not found in *C:\Documents and
> Settings\wwwroot\my scripts\perl.php* on line *5"*
> I have tried searching for solutions to this problem but to no avail.

You need to save that script to a file, and then use Perl and  
PHP::Interpreter (assuming that you've installed the latter from CPAN)  
to run it, like so:

   perl -MPHP::Interpreter -e 'PHP::Interpreter->new->include(shift)'  



Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About