????JFIF??x?x????'
Server IP : 79.136.114.73 / Your IP : 18.221.176.186 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/imap/tests/ |
Upload File : |
--TEST-- Test imap_fetchbody() function : basic functionality --SKIPIF-- <?php require_once(dirname(__FILE__).'/skipif.inc'); ?> --FILE-- <?php /* Prototype : string imap_fetchbody(resource $stream_id, int $msg_no, string $section * [, int $options]) * Description: Get a specific body section * Source code: ext/imap/php_imap.c */ echo "*** Testing imap_fetchbody() : basic functionality ***\n"; require_once(dirname(__FILE__).'/imap_include.inc'); // Initialise all required variables // set up mailbox with one message $stream_id = setup_test_mailbox('', 1, $mailbox, 'notSimple'); $msg_no = 1; $section = '2'; $options = array ('FT_UID' => FT_UID, 'FT_PEEK' => FT_PEEK, 'FT_INTERNAL' => FT_INTERNAL); // Calling imap_fetchbody() with all possible arguments echo "\n-- All possible arguments --\n"; foreach ($options as $key => $option) { echo "-- Option is $key --\n"; switch ($key) { case 'FT_UID'; $msg_uid = imap_uid($stream_id, $msg_no); var_dump( imap_fetchbody($stream_id, $msg_uid, $section, $option) ); break; case 'FT_PEEK'; var_dump( imap_fetchbody($stream_id, $msg_no, $section, $option) ); $overview = imap_fetch_overview($stream_id, 1); echo "Seen Flag: "; var_dump( $overview[0]->seen ); break; case 'FT_INTERNAL'; var_dump( imap_fetchbody($stream_id, $msg_no, $section, $option) ); break; } } // Calling imap_fetchbody() with mandatory arguments echo "\n-- Mandatory arguments --\n"; var_dump( imap_fetchbody($stream_id, $msg_no, $section) ); $overview = imap_fetch_overview($stream_id, 1); echo "Seen Flag: "; var_dump( $overview[0]->seen ); ?> ===DONE=== --CLEAN-- <?php require_once(dirname(__FILE__).'/clean.inc'); ?> --EXPECTF-- *** Testing imap_fetchbody() : basic functionality *** Create a temporary mailbox and add 1 msgs .. mailbox '{%s}%s' created -- All possible arguments -- -- Option is FT_UID -- %unicode|string%(36) "message 2:yyyyyyyyyyyyyyyyyyyyyyyyyy" -- Option is FT_PEEK -- %unicode|string%(36) "message 2:yyyyyyyyyyyyyyyyyyyyyyyyyy" Seen Flag: int(%d) -- Option is FT_INTERNAL -- %unicode|string%(36) "message 2:yyyyyyyyyyyyyyyyyyyyyyyyyy" -- Mandatory arguments -- %unicode|string%(36) "message 2:yyyyyyyyyyyyyyyyyyyyyyyyyy" Seen Flag: int(%d) ===DONE===