/
proc
/
3430793
/
root
/
usr
/
local
/
lsws
/
phpbuild
/
php-8.0.7
/
ext
/
zip
/
tests
/
File Upload :
llllll
Current File: //proc/3430793/root/usr/local/lsws/phpbuild/php-8.0.7/ext/zip/tests/oo_open.phpt
--TEST-- zip::open() function --SKIPIF-- <?php if(!extension_loaded('zip')) die('skip'); ?> --FILE-- <?php $dirname = __DIR__ . '/'; $zip = new ZipArchive; $r = $zip->open($dirname . 'nofile'); if ($r !== TRUE) { echo "ER_OPEN: ok\n"; } else { echo "ER_OPEN: FAILED\n"; } $r = $zip->open($dirname . 'nofile', ZIPARCHIVE::CREATE); if (!$r) { echo "create: failed\n"; } else { echo "create: ok\n"; } @unlink($dirname . 'nofile'); $zip = new ZipArchive; try { $zip->open(''); } catch (\ValueError $e) { echo $e->getMessage() . \PHP_EOL; } if (!$zip->open($dirname . 'test.zip')) { exit("failed 1\n"); } if ($zip->status == ZIPARCHIVE::ER_OK) { echo "OK\n"; } else { echo "failed\n"; } ?> --EXPECT-- ER_OPEN: ok create: ok ZipArchive::open(): Argument #1 ($filename) cannot be empty OK
Copyright ©2k19 -
Hexid
|
Tex7ure