nije uspelo... i da ne otvaram novu temu da ne zna neko u cemu je problem u ovoj skripti...
ne radi mi link ka sledecoj strani (uvek se otvara ista)... zapravo skripta je u redu, ista takva skripta radi kod mog druga, a meni nece...
Code:
<?
header("Content-type: text/vnd.wap.wml");
echo "<?wml version=\"1.0\"?>";
echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\""." \"http://www.wapforum.org/DTD/wml_1.1.xml\">";
include("settings.php");
//connectdb();
if (!isset($page)) {$page = 0;}
$total = 0;
if(!($dp = opendir("./"))) die ("Cannot open ./");
$file_array = array();
while ($file = readdir ($dp))
{
if(substr($file,0,1) != '.' and $file != "index.php" and $file != "settings.php")
{
$file_array[] = $file;
}
}
$file_count = count ($file_array);
sort ($file_array);
echo "<wml>";
echo "<card id=\"card1\" title=\"$naslov\">";
echo "<p align=\"center\"><br/>";
echo "<big><b>Ukupno: $file_count $fajlovi</b></big><br/>";
echo "<br/><br/>";
?>
<?
if ($file_count > 0)
{
$first_record = $page * $conf["items_per_page"];
$last_record = $first_record + $conf["items_per_page"];
while (list($fileIndexValue, $file_name) = each ($file_array))
{
if (($fileIndexValue >= $first_record) AND ($fileIndexValue < $last_record))
{
echo "<a href='$file_name'>$file_name (". round(filesize($file_name)/1024) . "kb)</a><br/>";
$total = $total + filesize($file_name);
}
}
if (($file_count > 0) AND ($page != 0))
{
// previous button
$prev_page = $page -1;
echo "<br/><a href=\"".$_SERVER["PHP_SELF"]."?page=$prev_page\">Nazad</a>";
}
if (($file_count > 0) AND ($last_record < $file_count))
{
// next button
$next_page = $page + 1;
echo "<br/><a href=\"".$_SERVER["PHP_SELF"]."?page=$next_page\">Napred</a><br/>";
}
echo "<br/><br/><a href=\"http://wapiz.biz\">Home</a><br/><br/><br/>";
echo "<small>©® by: <b>DjorDan</b></small><br/><br/>";
}
closedir($dp);
?>
</p>
</card>
</wml>
dakle na istom hostu kod njega radi, a kod mene ne... stvarno nemam nikakvu ideju u cemu moze da bude problem...