Jump to content


PERL/CGI & PHP include

  • Please log in to reply
1 reply to this topic

#1 vietboy505

  • Members
  • PipPip
  • Member
  • 16 posts

Posted 06 March 2006 - 08:35 PM

I want to include a PHP file inside a PERL file..


use strict;
use warnings;
use CGI qw(:standard);
use CGI::Carp qw(fatalsToBrowser warningsToBrowser);

print header();

print("<?php include('require_file.php') ?>\n\n");

It's in the source code, but it's never include my other php. How can I fixed that?
'require_file.php' is in the same directory the script1.pl is.

#2 vietboy505

  • Members
  • PipPip
  • Member
  • 16 posts

Posted 07 March 2006 - 03:19 PM

I try [a href=\"http://www.htmlgoodies.com/beyond/webmaster/article.php/3473341\" target=\"_blank\"]this link[/a], when I try in .pl file, it doesn't do nothing.
I also read this link, [a href=\"http://www.zend.com/php5/articles/php5-perl.php?article=php5-perl&kind=php5&id=6290&open=1&anc=0&view=1#Heading3\" target=\"_blank\"]PERL in PHP[/a]


    print "Hello from PHP!\n"; 
    $perl = new Perl(); 
    print "Bye!\n"; 

Give me this:

Hello from PHP!
Fatal error: Class 'Perl' not found in C:\Inetpub\webaps\test2.php on line 4

I try include inside PHP script inside PERL script, doesn't work, so I try the PHP include of PERL file. No luck at all.

Do I need to import Perl class from PHP or something?

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users