How to force listing hidden files with ftp connection in PHP script? Is there any context option for opendir?
Thanks
"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!
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.