1

PHPを使用すると、次のファイルのリストが得られます。

new ZipArchive();

zipファイルに入っているということです。

ファイルリストは次のとおりです。

  • ドキュメント/
  • docs/INSTALL.html
  • docs/auth_api.html
  • docs/corners_right.gif
  • docs/corners_right.png
  • docs/COPYING
  • docs/corners_left.png
  • docs/bg_header.gif
  • docs/CHANGELOG.html
  • docs/coding-guidelines.html
  • docs/hook_system.html
  • docs/FAQ.html
  • docs/site_logo.gif
  • ドキュメント/著者
  • docs/README.html
  • docs/corners_left.gif
  • docs/stylesheet.css
  • docs/新しいフォルダー/
  • docs/New Folder/New Text Document.txt
  • docs/新しいフォルダー/新しいフォルダー/

各ファイル パスからディレクトリ名を切り取り、サブカテゴリにする方法が必要です。

したがって、出力は次のようになります。

 docs/
  INSTALL.html
  auth_api.html
  corners_right.gif
  corners_right.png
  COPYING
  New Folder/
    New Text Document.txt
    New Folder/
      New Folder/ 

不可能ではないことを願っています

4

1 に答える 1

0

split('/',path)またはpreg_split(php 6 の場合) ドキュメント (例を含む) は次の場所にあります: http://www.php.net/manual/en/function.split.phpおよびhttp://www.php.net/manual/ en/function.preg-split.php

于 2009-12-09T10:07:07.613 に答える