Benimde arkadaşınkine benzer bir sorunum var. Sayfalama yapamıyorum.
index.php dosyası:
<?php include('include/ust.php');?>
<div id="ana_alan">
<?php include ('include/sol.php');?>
<div id="merkez">
<?php include ('include/ana.php');?>
</div>
<?php include ('include/sag.php');?>
</div>
<?php include ('include/alt.php');?>sayfalama scripti:
<?php
$sayfa_sayisi++;
}
$nerden=($sayfa*$kacar)-$kacar;
$sorgu=mysql_query("SELECT * FROM yurt_ici_otel LIMIT $nerden,$kacar");
$page = $_SERVER['PHP_SELF'];
while ($yaz=mysql_fetch_array($sorgu)) {
@$resim=$yaz[resim1];
@$otel=$yaz[isim];
@$aciklama=$yaz[aciklama];
@$sehir=$yaz[sehir];
@$id=$yaz[id];
?>
<div class="block">
<a href="#"><img src="<?php echo @$resim;?>" alt="" width="180" height="126" /></a>
<div>
<h4><?php echo @stripslashes($otel);?></h4>
<p><?php echo @substr(stripslashes($aciklama),0,300); ?></p>
<span class="price"><?php echo @stripslashes($sehir);?></span>
<a href="?sayfa=pages/otel_detay&id=<?php echo @$id;?>"class="more">incele</a>
</div>
</div>
<?php
}
echo "<br>";
for ($i=1; $i<=$sayfa_sayisi; $i++) {
echo "<a href=?sayfa=include/anasayfa&sayfa=$i>$i</a> ";
}
?>Gelen tüm sayfaları ek bir çatıda toplamak için oluşturduğum iskelet:
ana.php:
<?php
if(!isset($_GET["sayfa"]))
include("anasayfa.php");
else
include($_GET["sayfa"] . ".php");
?>yazılımın verdiği hata:
Warning: include(1.php) [function.include]: failed to open stream: No such file or directory in C:\wamp\www\santatur\include\main.php on line 6
Warning: include() [function.include]: Failed opening '1.php' for inclusion (include_path='.;C:\php5\pear') in C:\wamp\www\santatur\include\main.php on line 6
Sayfalama olayını bir türlü yukardaki mantığa göre oturtamadım. Bu sorunu nasıl halledebilirim.