Re: file get contents

From: Date: Mon, 14 Nov 2005 09:53:20 +0000
Subject: Re: file get contents
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-225726@lists.php.net to get a copy of this message
Hi Ross, Monday, November 14, 2005, 9:44:45 AM, you wrote: > $lines = file_get_contents('../shared/acessibility_box.htm'); > In this file I have the a self submitting link > <a href="<? $_SERVER['PHP_SELF']; ?>?text_size=small" > class="size1">A</a> > The problem I think is this code is inserted after the page headers have > been set. And so the line just generates an error. file_get_contents does exactly that - it gets the contents of the file *without* parsing it, i.e. any raw PHP code that exists within it, will be treated as what it is when 'got' = plain text. Cheers, Rich -- Zend Certified Engineer PHP Development Services http://www.corephp.co.uk

« previous php.general (#225726) next »