note 27075 deleted from function.include by sniper

From: Date: Sat, 18 Jan 2003 15:23:33 +0000
Subject: note 27075 deleted from function.include by sniper
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-42348@lists.php.net to get a copy of this message
I used this function to include a file and check if it exists. This function doesn't actually use the include() function. function file_include($file,$errmsg) { if (!file_exists($file)) { die($errmsg); } $fp=fopen($file,"r"); $includedtext=fread($fp,filesize($file)); // Other things such as strstr() and str_replace() could be here. print $includedtext; } I am not totally sure if this is correct, though.

« previous php.notes (#42348) next »