note 41139 added to function.file-get-contents

From: Date: Wed, 31 Mar 2004 13:42:15 +0000
Subject: note 41139 added to function.file-get-contents
Groups: php.notes 
Request: Send a blank email to php-notes+get-67417@lists.php.net to get a copy of this message
There's a trick... I needed to place bare html-code into parameter of a variable, and then display it with the function of my class. The deal was that html-code contained quotes _"_ This function is exactly what u need in such a case. <? include ("page.cls"); // my template of a class $indexpage = new Page(); // this file contains html-code with lots of quotes _"_ $newcontent = file_get_contents($_SERVER['DOCUMENT_ROOT']."data/index.dt"); // here I constantly was getting message about incorrect // parameters (if you don't use file_get_contents();, // but something else) $indexpage -> SetContent("$newcontent"); $indexpage -> Display(); ?> ------ it's not the best way to solve this problem! I just can afford myself to use this code. Avoide such programming =) ---- Manual Page -- http://www.php.net/manual/en/function.file-get-contents.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+41139 Delete -- http://master.php.net/manage/user-notes.php?action=delete+41139&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+41139&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#67417) next »