问题
How to force listing hidden files with ftp connection in PHP script? Is there any context option for opendir?
Thanks
回答1:
"ftp_rawlist — Returns a detailed list of files in the given directory" (raw => ALL incl. hidden)
https://secure.php.net/manual/en/function.ftp-rawlist.php
There is one comment to the ftp_rawlist:
Get a listing of all files including hidden files except '.' or '..' use:
<?php ftp_chdir($connid, $dir); ftp_rawlist($connid, "-A"); ?>
This had me dancing in circles for some time!
来源:https://stackoverflow.com/questions/23346935/php-opendir-force-listing-hidden-files-ftp