Re: remove header tags - include file (the solution)

From: Date: Fri, 19 Jul 2002 07:23:57 +0000
Subject: Re: remove header tags - include file (the solution)
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-108487@lists.php.net to get a copy of this message
Hi everyone, This post is only for the archive. I want to share the final solution. Of course all the credit is from Asmodean (and thanks also to Mr. Lynch) good day! --jp function includeHTML($f) {
        echo "<!-- begin .html -->\n";
        $fp = @fopen($f,"r") or die ("Error - failed to open file : $f");
        $content = fread($fp,filesize($f));
        preg_match("/<body>(.*?)<\/body>/s",$content ,$matches);
        print $matches[1];
        echo "<!-- end .html -->\n";
} At 13:00 17-07-2002, Juan Pablo Aqueveque wrote:
Hi guys, me again. (thanks kevin, but i'm afraid you didn't understand me). After looking for untiringly in the archives I have I decide to ask again. This is my problem: I want include the file html.html inside of my file index.php, but before include it I want to remove <html>..</head> tags from my html.html file. My pseudo code would be look like this: index.php <?php include_once("common.php"); header("Welcome to my page");
        include_html_file("html.html");
footer() ?> common.php function include_html_file($f) {
        (your kind contribution:-) )
} thanks!! --jp -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
________________________________________________________ Juan Pablo Aqueveque <juque@uct.cl> Ingeniero de Sistemas Departamento de Redes y Comunicaciones http://www.drc.uct.cl Universidad Católica de Temuco. Tel:(5645) 205 630 Fax:(5645) 205 628

« previous php.general (#108487) next »