Not for 'how-to' coding questions but PHP theory instead, this forum is here for those of us who wish to learn about design aspects of programming with PHP.
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
hi, i would like to know how to get the a php pagination for txt files as shown below
<?php
$filename="mycontent.txt";
$fp=fopen ($filename, "r") or die ("Couldn't open $filename");
while (! feof ($fp))
{
$line = fgets ($fp, 1024);
print "$line<br>";
}
?>
i need a php pagination please, as i have about 7 .txt files to display on different pages.
any ideas on how to get this sorted?
many thanks for having a look.
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
But files listed as paginated results...is probably the one and only time you *don't* want to paginate results...ergonomically most people (myself included) expect files to be listed completely...any pagination is usually handled implicitly through directories/folders which the user creates...
Hockey wrote:But files listed as paginated results...is probably the one and only time you *don't* want to paginate results...ergonomically most people (myself included) expect files to be listed completely...any pagination is usually handled implicitly through directories/folders which the user creates...
So why does Unix have the 'more' command (eg ls -a | more )?
Paging through things is always a good idea if you have a long list. You should be able to sort, search, filter, and control the number of items returned too. For everything. Even files.
Hockey wrote:But files listed as paginated results...is probably the one and only time you *don't* want to paginate results...ergonomically most people (myself included) expect files to be listed completely...any pagination is usually handled implicitly through directories/folders which the user creates...
So why does Unix have the 'more' command (eg ls -a | more )?
Paging through things is always a good idea if you have a long list. You should be able to sort, search, filter, and control the number of items returned too. For everything. Even files.
Thats a good point... But I've yet to see a GUI file explorer that paginated results??? Obviously it's possible...but my point was that for files at least, it's going against common convention...from what I've experienced.
Of course I don't exactly tinker with file managers all to much...so what do I know
that's exactly what is happening in my case Hockey, i have a folder that holds just under 10 files which i am trying to paginate. i am still working on it though...