SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    SitePoint Enthusiast
    Join Date
    Oct 2004
    Location
    italy
    Posts
    65
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    error with an include

    Hi,

    I get an error on this page: http://www.rondinellabasket.com/squadre/promozione.php (u can see the error on the right's column).

    Basically I wanna include in that page with this code:
    </td>
    <?PHP
    include('../includes/menudestra.php');
    ?>


    this other page here: http://www.rondinellabasket.com/includes/menudestra.php that has the following code:

    Code:
    <td width="160" valign="top" align="center">
    <br>
    <font color="White" size="2"><b>.: <u>ULTIME NOTIZIE</u> :.</b></font><br><br>
                                    
    <?php 
    $PHP_SELF = 'index.php'; 
    $static = true; 
    $template = 'Headlines'; 
    $number = 10; 
    $category = "2";
    include('news/show_news.php'); 
    ?>
    </td>
    What is wrong?

  2. #2
    3MTA3
    Join Date
    Jul 2003
    Location
    Florida
    Posts
    1,016
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    try changing this
    PHP Code:
    include('news/show_news.php'); 
    to
    PHP Code:
    include('../news/show_news.php'); 

    or you could use absolute paths

  3. #3
    SitePoint Enthusiast
    Join Date
    Oct 2004
    Location
    italy
    Posts
    65
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by devised
    try changing this
    PHP Code:
    include('news/show_news.php'); 
    to
    PHP Code:
    include('../news/show_news.php'); 

    or you could use absolute paths
    what is absolute paths?
    never used this

  4. #4
    3MTA3
    Join Date
    Jul 2003
    Location
    Florida
    Posts
    1,016
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    An absoulte path is the full path on the server. If "news" is a directory in the root of your site, then this should be the absolute path for the file:
    PHP Code:
    /home/rondinel/public_html/news/show_news.php 

  5. #5
    SitePoint Enthusiast
    Join Date
    Oct 2004
    Location
    italy
    Posts
    65
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks it helped

  6. #6
    3MTA3
    Join Date
    Jul 2003
    Location
    Florida
    Posts
    1,016
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    np

  7. #7
    SitePoint Enthusiast
    Join Date
    Oct 2004
    Location
    italy
    Posts
    65
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    mmm I've noticed that if u click on the news title on the right it doesn't go to the news

  8. #8
    3MTA3
    Join Date
    Jul 2003
    Location
    Florida
    Posts
    1,016
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    try putting a backslash, "/", in front of it so that the path starts from the root of the site


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •