Originally posted by GumSlone
View Post
DAT extension file support on LINUX
Collapse
X
-
PHP Code:$content = file_get_contents('dile.dat');
echo $content;
Leave a comment:
-
no bro can not able to read that online1.dat file
i have testing as your code below;
Code:<?php header("Cache-Control: no-cache, must-revalidate"); // Prevent caching, HTTP/1.1 header("Pragma: no-cache"); //header('Content-type: application/vnd.wap.xhtml+xml'); echo "<?xml version=\"1.0\"?>"; echo "<!DOCTYPE html PUBLIC \"-//WAPFORUM//DTD XHTML Mobile 1.0//EN\" \"http://www.wapforum.org/DTD/xhtml-mobile10.dtd\">"; ?> <html xmlns="http://www.w3.org/1999/xhtml"> <?php echo "<head>"; echo "<title>Testing......</title>"; echo "</head>"; echo "<body>"; $p = 5; $xfile=file('online1.dat'); $countfile=count($xfile); if($npage=="")$npage="1"; echo "Tests:".$countfile."\n"; $second=($p*$npage); $first=($p*($npage-1)); $npages=(int) ceil($countfile/$p); if ($npage<=$npagesAND$npage>1)$gline_rew="<a href=\"$PHP_SELF?npage=".($npage-1)."\">Prev</a>"; if ($npages > 1 AND $npage<$npages) $gline_next = "<a href=\"$PHP_SELF?npage=".($npage+1)."\">Next</a> "; for ($i = $first; $i <=*$second-1; $i++) { $a=explode("?",$xfile[$i]); $test = rtrim($a[0]); echo "$test"; } print "".$gline_rew."|".$gline_next.""; echo "</body>"; ?> </html>
Leave a comment:
-
You want to read it or make it work ??
Added after 6 minutes:
Code:$p = 5; $xfile=file('online1.dat'); $countfile=count($xfile); if($npage=="")$npage="1"; echo "Tests:".$countfile."\n"; $second=($p*$npage); $first=($p*($npage-1)); $npages=(int) ceil($countfile/$p); if ($npage<=$npagesAND$npage>1)$gline_rew="<a href=\"$PHP_SELF?npage=".($npage-1)."\">Prev</a>"; if ($npages > 1 AND $npage<$npages) $gline_next = "<a href=\"$PHP_SELF?npage=".($npage+1)."\">Next</a> "; for ($i = $first; $i <=*$second-1; $i++) { $a=explode("?",$xfile[$i]); $test = rtrim($a[0]); echo "$test"; } print "".$gline_rew."|".$gline_next."";Last edited by subzero; 05.09.10, 08:40.
Leave a comment:
-
DAT extension file support on LINUX
hi,
welcome to code masters and serverman !
my server does not support DAT file [ .dat extension ]
anybody know what should install ?
need help
1 simple DAT file is attached
Thanks!Attached FilesTags: None
Leave a comment: