domotd.php

来自「flashget43的源代码 一个比较常用的下载程序」· PHP 代码 · 共 17 行

PHP
17
字号
<?php

				$rfile = './appdata/motd.txt';

				
				if(file_exists($rfile) && $php_file = @fopen($rfile, 'rb')) {
					$contents = fread($php_file, $fz = filesize ($rfile));
					fclose ($php_file);

					$contents = str_replace( chr(13) . chr(10) , "<br>", $contents); // replace crlf with line breaks
					$contents = str_replace( chr(10) . chr(13) , "<br>", $contents); // replace lfcr with line breaks
					$rtxt = explode('<br>', $contents);

					foreach($rtxt as $k => $v)
						$this->sendToUser(null, new Message('msg', $this->userid, $GLOBALS['fc_config']['liveSupportMode']?$this->roomid:null, $v, $this->color));
				}
?>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?