I have a database some short notes in a .txt format file and i have created a php webpage that includes a txt file in html format. Now I have to use "Next" and "Preview" links for that .txt format files.
Can anyone suggest me the php or JavaScript code for that..
I have a suggetion if i name that all short notes files as 1, 2, 3, ... so can i use next and preview by using loop in javascript or php?? Can you suggest me that code?? Please....
kirtan_thakkar
Recommended Answers
Jump to Postspecify your problem in detail may be with your code.
Jump to Postnot sure but if you want just paging for one big content.
then go with this link:
http://blog.mastykarz.nl/paging-large-content-sharepoint-jquery/
Jump to PostUse following script, nothing more to do. Set your text directory path in currdirectory folder.
<?php $currdirectory="textfilesfolder";//path or your current directory from where you want to show files. i assume all files are text files if($_REQUEST['txtfile']=="") $txtfile=$currdirectory."/1.txt"; else $txtfile=$currdirectory."/".$_REQUEST['txtfile']; $files = scandir($currdirectory); $nextfile=$files[2]; for ($i=0;$i<count($files);$i++) { $content=$currdirectory."/".$files[$i]; …
Jump to PostMy fisrt script was better. it shows all files in your directory in file order. you may user a.txt... like that.
another version given below based on 1,2,3,4 series, which depends on series of number. if suppose 5.txt is not there then below script will fail.
All 13 Replies
urtrivedi
276
Nearly a Posting Virtuoso
vibhaJ
126
Master Poster
kirtan_thakkar
rajarajan2017
kirtan_thakkar
rajarajan2017
urtrivedi
276
Nearly a Posting Virtuoso
kirtan_thakkar
kirtan_thakkar
urtrivedi
276
Nearly a Posting Virtuoso
kirtan_thakkar
urtrivedi
276
Nearly a Posting Virtuoso
kirtan_thakkar
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.