????JFIF??x?x????'
Server IP : 79.136.114.73 / Your IP : 216.73.216.86 Web Server : Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.29 OpenSSL/1.0.1f System : Linux b8009 3.13.0-170-generic #220-Ubuntu SMP Thu May 9 12:40:49 UTC 2019 x86_64 User : www-data ( 33) PHP Version : 5.5.9-1ubuntu4.29 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /proc/self/root/home/b8009/php-5.6.22/ext/standard/tests/file/ |
Upload File : |
--TEST-- Test readfile() function: basic functionality --SKIPIF-- <?php if (substr(PHP_OS, 0, 3) != 'WIN') { die('skip.. only on Windows'); } ?> --FILE-- <?php /* Prototype: int readfile ( string $filename [, bool $use_include_path [, resource $context]] ); Description: Outputs a file */ // common file used require(dirname(__FILE__) . '/file.inc'); echo "*** Testing readfile() : basic functionality ***\n"; $file_path = dirname(__FILE__); $file_prefix = "readfile_basic"; // temp files created with this prefix // the content that is filled into the temp files as created $filetypes = array("numeric", "text", "empty", "alphanumeric", "text_with_new_line"); // different file modes $filemodes = array("w", "wt", "wb", "w+", "w+b", "w+t", "a", "at", "ab", "a+", "a+b", "a+t", "x", "xb", "xt", "x+", "x+b", "x+t"); // create file, read the file content, delete file foreach($filetypes as $type) { echo "\n-- File filled with content type: $type --\n"; foreach($filemodes as $mode) { echo "-- File opened with mode: $mode --\n"; if ( strstr($mode, "x") ) { $fp = fopen($file_path."/".$file_prefix."1.tmp", $mode); fill_file($fp, $type, 100); fclose($fp); } else { // creating file in write mode create_files($file_path, 1, $type, 0755, 100, $mode, $file_prefix, 1, "byte"); } $count = readfile($file_path."/".$file_prefix."1.tmp"); echo "\n"; var_dump($count); // delete files created delete_files($file_path, 1, $file_prefix, 1); } } echo "Done\n"; ?> --EXPECT-- *** Testing readfile() : basic functionality *** -- File filled with content type: numeric -- -- File opened with mode: w -- 2222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 int(100) -- File opened with mode: wt -- 2222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 int(100) -- File opened with mode: wb -- 2222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 int(100) -- File opened with mode: w+ -- 2222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 int(100) -- File opened with mode: w+b -- 2222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 int(100) -- File opened with mode: w+t -- 2222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 int(100) -- File opened with mode: a -- 2222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 int(100) -- File opened with mode: at -- 2222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 int(100) -- File opened with mode: ab -- 2222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 int(100) -- File opened with mode: a+ -- 2222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 int(100) -- File opened with mode: a+b -- 2222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 int(100) -- File opened with mode: a+t -- 2222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 int(100) -- File opened with mode: x -- 2222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 int(100) -- File opened with mode: xb -- 2222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 int(100) -- File opened with mode: xt -- 2222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 int(100) -- File opened with mode: x+ -- 2222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 int(100) -- File opened with mode: x+b -- 2222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 int(100) -- File opened with mode: x+t -- 2222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 int(100) -- File filled with content type: text -- -- File opened with mode: w -- text text text text text text text text text text text text text text text text text text text text int(100) -- File opened with mode: wt -- text text text text text text text text text text text text text text text text text text text text int(100) -- File opened with mode: wb -- text text text text text text text text text text text text text text text text text text text text int(100) -- File opened with mode: w+ -- text text text text text text text text text text text text text text text text text text text text int(100) -- File opened with mode: w+b -- text text text text text text text text text text text text text text text text text text text text int(100) -- File opened with mode: w+t -- text text text text text text text text text text text text text text text text text text text text int(100) -- File opened with mode: a -- text text text text text text text text text text text text text text text text text text text text int(100) -- File opened with mode: at -- text text text text text text text text text text text text text text text text text text text text int(100) -- File opened with mode: ab -- text text text text text text text text text text text text text text text text text text text text int(100) -- File opened with mode: a+ -- text text text text text text text text text text text text text text text text text text text text int(100) -- File opened with mode: a+b -- text text text text text text text text text text text text text text text text text text text text int(100) -- File opened with mode: a+t -- text text text text text text text text text text text text text text text text text text text text int(100) -- File opened with mode: x -- text text text text text text text text text text text text text text text text text text text text int(100) -- File opened with mode: xb -- text text text text text text text text text text text text text text text text text text text text int(100) -- File opened with mode: xt -- text text text text text text text text text text text text text text text text text text text text int(100) -- File opened with mode: x+ -- text text text text text text text text text text text text text text text text text text text text int(100) -- File opened with mode: x+b -- text text text text text text text text text text text text text text text text text text text text int(100) -- File opened with mode: x+t -- text text text text text text text text text text text text text text text text text text text text int(100) -- File filled with content type: empty -- -- File opened with mode: w -- int(0) -- File opened with mode: wt -- int(0) -- File opened with mode: wb -- int(0) -- File opened with mode: w+ -- int(0) -- File opened with mode: w+b -- int(0) -- File opened with mode: w+t -- int(0) -- File opened with mode: a -- int(0) -- File opened with mode: at -- int(0) -- File opened with mode: ab -- int(0) -- File opened with mode: a+ -- int(0) -- File opened with mode: a+b -- int(0) -- File opened with mode: a+t -- int(0) -- File opened with mode: x -- int(0) -- File opened with mode: xb -- int(0) -- File opened with mode: xt -- int(0) -- File opened with mode: x+ -- int(0) -- File opened with mode: x+b -- int(0) -- File opened with mode: x+t -- int(0) -- File filled with content type: alphanumeric -- -- File opened with mode: w -- ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 int(100) -- File opened with mode: wt -- ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 int(100) -- File opened with mode: wb -- ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 int(100) -- File opened with mode: w+ -- ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 int(100) -- File opened with mode: w+b -- ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 int(100) -- File opened with mode: w+t -- ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 int(100) -- File opened with mode: a -- ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 int(100) -- File opened with mode: at -- ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 int(100) -- File opened with mode: ab -- ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 int(100) -- File opened with mode: a+ -- ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 int(100) -- File opened with mode: a+b -- ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 int(100) -- File opened with mode: a+t -- ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 int(100) -- File opened with mode: x -- ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 int(100) -- File opened with mode: xb -- ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 int(100) -- File opened with mode: xt -- ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 int(100) -- File opened with mode: x+ -- ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 int(100) -- File opened with mode: x+b -- ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 int(100) -- File opened with mode: x+t -- ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 int(100) -- File filled with content type: text_with_new_line -- -- File opened with mode: w -- line line of text line line of text line line of text line line of text line line of text line line int(100) -- File opened with mode: wt -- line line of text line line of text line line of text line line of text line line of text line line int(111) -- File opened with mode: wb -- line line of text line line of text line line of text line line of text line line of text line line int(100) -- File opened with mode: w+ -- line line of text line line of text line line of text line line of text line line of text line line int(100) -- File opened with mode: w+b -- line line of text line line of text line line of text line line of text line line of text line line int(100) -- File opened with mode: w+t -- line line of text line line of text line line of text line line of text line line of text line line int(111) -- File opened with mode: a -- line line of text line line of text line line of text line line of text line line of text line line int(100) -- File opened with mode: at -- line line of text line line of text line line of text line line of text line line of text line line int(111) -- File opened with mode: ab -- line line of text line line of text line line of text line line of text line line of text line line int(100) -- File opened with mode: a+ -- line line of text line line of text line line of text line line of text line line of text line line int(100) -- File opened with mode: a+b -- line line of text line line of text line line of text line line of text line line of text line line int(100) -- File opened with mode: a+t -- line line of text line line of text line line of text line line of text line line of text line line int(111) -- File opened with mode: x -- line line of text line line of text line line of text line line of text line line of text line line int(100) -- File opened with mode: xb -- line line of text line line of text line line of text line line of text line line of text line line int(100) -- File opened with mode: xt -- line line of text line line of text line line of text line line of text line line of text line line int(111) -- File opened with mode: x+ -- line line of text line line of text line line of text line line of text line line of text line line int(100) -- File opened with mode: x+b -- line line of text line line of text line line of text line line of text line line of text line line int(100) -- File opened with mode: x+t -- line line of text line line of text line line of text line line of text line line of text line line int(111) Done