הוסטס - פורום אחסון האתרים הגדול בישראל

הוסטס - פורום אחסון האתרים הגדול בישראל (https://hosts.co.il/forums/index.php)
-   פורום תיכנות (https://hosts.co.il/forums/forumdisplay.php?f=14)
-   -   בעיה בקובץ מסוים - (https://hosts.co.il/forums/showthread.php?t=43852)

Gold-System 18-04-07 20:11

בעיה בקובץ מסוים -
 
זה הקובץ -
index2.php

קוד:

<html dir="rtl">
<title>
goldsystem.co.il - פאנל ניהול אתר | ניהול דפים
</title>
<?
include "db.php";

if(!$_GET['page']) 
$page = '1'; 
else   
$page = $_GET['page'];   

$per = 5;
$end=$per*$page;
$start = $per*($page - 1); 

$select_comments = mysql_query("SELECT * FROM `links` ORDER by id DESC LIMIT $start,$end");
if(@mysql_num_rows($select_comments) == 0){
  echo ""
<p align='center'><font face='Arial' size='2'>לא נמצאו דפים במערכת!</font></p>
<p align='center'></p>
<p align='center'><b><font face='Arial' size='2'><a href='add_link.php'>
<font color='#000000'>הוסף דף >></font></a></font></b></p>
";
}else {
    while($row = mysql_fetch_array($select_comments)){
    $id = ($row['id']);
    $link = ($row['link']);
    $name = ($row['name']);

        echo <<< EOD



<html dir="rtl">

<table border="0" width="100%" style="padding-left: 4px; padding-right: 4px; padding-top: 1px; padding-bottom: 1px">
        <tr>
                <td width="26" bgcolor="#EBEBEB">
                <p align="center"><b><font face="Arial">
                ID</font></b></td>
                <td width="218">
                <p align="center"><b><font face="Arial">שם האתר</font></b></td>
                <td width="238" bgcolor="#EBEBEB">
                <p align="center"><b><font face="Arial">תוכן</font></b></td>
                <td width="218">
                <p align="center"><b><font face="Arial">אפשרויות</font></b></td>
                <td bgcolor="#EBEBEB" width="48">
                <p align="center"><b><font face="Arial">
  </tr>
</table>
<table border="0" width="100%">
    <tr>
        <td width="28">
        <p align="center"><font face="Arial">$id</font></td>
        <td width="218">
        <p align="center"><font face="Arial">&nbsp;$name</font></td>
        <td width="236">
        <p align="center"><font face="Arial">&nbsp;$link</font></td>
        <td>
        <p align="center"><font face="Arial"><b>
        <a target="_blank" href="http://$link"><font color="#000000">כנס לאתר</font></a></b>&nbsp; 
        |&nbsp; </font><font face="Arial"><a href="edit.php?id=$id">
        <font color="#000000">
        ערוך</font></a>&nbsp;&nbsp; |&nbsp;&nbsp; <a href="delete.php?id=$id">
        <font color="#000000">מחק</font></a></font></td>
    </tr>
</table>


EOD;
}}
$query = mysql_query("SELECT * FROM `links`");   
$number = mysql_num_rows($query);
$pages = ceil($number / 5); 
for($x = 1; $x<=$pages; $x++) 

echo "
<center>
                <a href='index.php?page={$x}'>$x</a>
                </center>
"; 


?>

פשוט מציג דף ריק!
מה הבעיה?

תודה :-)

Talbo 18-04-07 20:20

יכול להיות שאני טועה,
אני לא כל כך מבין בזה,
אבל אין לך תגית של <php> שם..

Gold-System 18-04-07 20:23

טל,
נחמד מצדך שאתה עוזר,
אך שלושה דברים יש לי להגיד לך -

1) זה לא <php> אלא <php
2) ניתן להתחיל מסמך php גם ב <?
3) הסתדרתי, זו הייתה בעיה ממש קטנה, תודה שניסית לעזור =]

אפשר לנעול,
תודה רבה! :)


כל הזמנים הם GMT +2. הזמן כעת הוא 01:35.

מופעל באמצעות VBulletin גרסה 3.8.6
כל הזכויות שמורות ©
כל הזכויות שמורות לסולל יבוא ורשתות (1997) בע"מ