File Phrasing & Mark-ups

From: Date: Sat, 03 Aug 2002 06:27:47 +0000
Subject: File Phrasing & Mark-ups
Groups: php.general 
Request: Send a blank email to php-general+get-110920@lists.php.net to get a copy of this message
A function I have written to accept filenames, read it and phrase it's mark ups. Is the second function of one line file a good idea ? Is there an alternative ? Can problems arise if the size of the file being phrased is very large ? ================================== <?php //Phrases Files. Acknoledges certains special mark-ups if present. function phrase($file) { $output=onelinefile($file); $output=str_replace("[TITLE]",": ".$GLOBALS["title"],$output); $output=str_replace("[LOGO]",onelinefile("_logos"),$output); $output=str_replace("[COPYRIGHT]","Copyright (C) 2002 Findmaan.",$output); return $output; } //reads a file and returns a variable with the entire file in one line. function onelinefile($file) { $fa=file($file); $i=0; do { $output=$output.$fa[$i]; $i++; }while($i<count($fa)); return $output; } ?> =========================

« previous php.general (#110920) next »