I am currently attempting to access files on a different server using file tree. I was wonde开发者_运维百科ring if this was possible? It's using PHP script to pull the data. I am able to get to the root of my own server, but I can't seem to direct link into another server.
You could try creating your own custom PHP connector and set it to use FTP rather than scandir. It should not be too difficult to do - just create a new version of the /connectors/jqueryFileTree.php file. Below is a VERY basic example of connecting to an FTP server using PHP to get you going.
$conn = ftp_connect("ftp.hostname.com");
$login = ftp_login($conn, "username", "password");
$n = ftp_nlist($conn, "dir");
foreach($n as $value){
echo $value, "<br />";
}
Perhaps you're running into security restrictions fromt he same origin policy? Can you use JSONP to get your data?
精彩评论