Re: $html_code .= include ("filetoinclude.txt");

From: Date: Sat, 12 Oct 2002 19:47:53 +0000
Subject: Re: $html_code .= include ("filetoinclude.txt");
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-119739@lists.php.net to get a copy of this message
Your email is not 100% totally clear with what you are actually trying to accomplish, however, here is an example of how i like to get html source code into a variable from a file. $html_code = implode( '', file( 'filetoinclude.txt' ) ); or append it... $html_code .= implode( '', file( 'filetoinclude.txt' ) ); Hope that helps you out. On Sat, 2002-10-12 at 09:50, Research and Development wrote: > Should this work? > > $html_code .= include ("filetoinclude.txt"); > > I am populating a variable with html to be printred later as usual: > $html_code .= "html....". > > But I have some static html files that I want included in the html that > I am storing in the variable. The HTML is in text files. The above code > obviously does not work. I want to know if there is another way. > > Thanks. -- .: B i g D o g :.

« previous php.general (#119739) next »