ajax-chat/src/AJAXChatFileSystem.php

22 lines
490 B
PHP
Raw Permalink Normal View History

2022-02-06 16:08:09 +00:00
<?php
/*
* @package AJAX_Chat
* @author Sebastian Tschan
* @copyright (c) Sebastian Tschan
* @license GNU Affero General Public License
* @link https://blueimp.net/ajax/
*/
// Class to provide methods for file system access:
class AJAXChatFileSystem {
2022-02-06 16:26:14 +00:00
public static function getFileContents($file) {
if(function_exists('file_get_contents')) {
return file_get_contents($file);
} else {
return(implode('', file($file)));
}
}
2022-02-06 16:08:09 +00:00
}