I wrote a php script which fetches the data from file server,it lists all the uploaded file on server.
Now problem is there is large no. of file on my server ,i want limited results per page how can i implement pagination for this.
My php code is :
$ftp_server = "ftp.abc.com";
$ftp_user = "uploads@abc.com";
$ftp_password = "xyz";
$conn = ftp_connect($ftp_server) or die("could not connect to ftp server");
if (ftp_login($conn, $ftp_user, $ftp_password)) {
$contents = ftp_nlist($conn, $path);
foreach($contents as $value) {
$i++;
echo "$i <a href='#form' id='url_title' class='links'>$value</a><br><br> <br>";
}
}