Навигация по разделуВсе категорииБолталкаЗаметкиPHP
Свернуть категорию PHPДобавить в категорию
Замена функции file_get_contents() для php 4
Add to favorites 
Добавлено : 2008-05-09 08:55:49 . Пользователем : BOSS . Все предложения : BOSS . Просмотров - 1504
if (!function_exists(file_get_contents)) { 


// Define function and arguments
function file_get_contents($file, $include=false)
{
// Varify arguments are correct types
if (!is_string($file)) return(false);
if (!is_bool($include)) return(false);

// Open the file with givin options
if (!$handle = @fopen($file, rb, $include)) return(false);
// Read data from file
$contents = fread($handle, filesize($file));
// Close file
fclose($handle);

// Return contents of file
return($contents);
}
}
Ключевые слова :

Для добавления вашего коментария вы должны авторизоваться , если вы не зарегистрированы то зарегистрируйтесь .


Shop4guru © v.3.1.1, Copyright © 2005-2008, 4gu.ru Ltd. Русская версия: Shop4guru ™