#1
  1. No Profile Picture
    PHP Programmer
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2000
    Posts
    31
    Rep Power
    15
    Can I include a PHP file in my PERL script ?
    If not so.. Can I include a HTML file ?
    And ofcourse. How do I do it ?
  2. #2
  3. No Profile Picture
    freebsd
    Guest
    Devshed Newbie (0 - 499 posts)
    You can't. You should open and read a file instead.
    ############################################
    #!/usr/local/bin/perl
    print "Content-type: text/htmlnn";
    open(HEADER,"header.html");
    @lines=<HEADER>;
    close(HEADER);
    print "@linesn";
    exit;
    ############################################
    Or try this:
    #hello.php4
    <? echo "Hello World"; ?>

    #test.pl
    #!/usr/local/bin/perl
    print "Content-type: text/htmlnn";
    print "This is a test!n";
    exit;

    #include.html
    <html>
    <body>
    <h1 align="center"><!--#include virtual="hello.php4"--></h1>
    <p><!--#include virtual="test.pl"--></p>
    </body>
    </html>

IMN logo majestic logo threadwatch logo seochat tools logo