是否可以列出来自远程服务器的所有文件。我在serverOne.com上运行这个代码,它是一个php服务器。我想访问serverTwo.com/dirOne它的aTomcat服务器。在php中访问远程服务器的目录?
$path = "http://www.serverTwo.com/dirOne"; if ($handle = opendir($widget_path)) { while (false !== ($widgetfile = readdir($handle))) { if ($widgetfile != "." && $widgetfile != "..") { echo $widgetfile; } } closedir($handle); }