📄 oo_addfile.phpt
字号:
--TEST--ziparchive::addFile() function--SKIPIF--<?php/* $Id: oo_addfile.phpt,v 1.1 2006/07/24 16:58:58 pajoye Exp $ */if(!extension_loaded('zip')) die('skip');?>--FILE--<?php$dirname = dirname(__FILE__) . '/';include $dirname . 'utils.php';$file = $dirname . '__tmp_oo_addfile.zip';copy($dirname . 'test.zip', $file);$zip = new ZipArchive;if (!$zip->open($file)) { exit('failed');}if (!$zip->addFile($dirname . 'utils.php', 'test.php')) { echo "failed\n";}if ($zip->status == ZIPARCHIVE::ER_OK) { dump_entries_name($zip); $zip->close();} else { echo "failed\n";}@unlink($file);?>--EXPECTF--0 bar1 foobar/2 foobar/baz3 entry1.txt4 test.php
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -