New Server Made my Include code not Work!

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • aznkid14
    New Member
    • Oct 2006
    • 1

    #1

    New Server Made my Include code not Work!

    Ok this is the situation! My host got us a new server and moved us 2 days ago. Ever since those 2 days, I've been having this problem.

    Here is the code I use:
    [PHP]<?php

    if(!$nr || $nr == "") {

    include("../forums/news.php");

    }
    else {
    include "content/$nr.php";
    }

    ?>[/PHP]

    Here is the problem. The news.php shows up fine, but whatever that is in content/something.php will not show up.

    For example:
    http://www.my-site.com/index.php?nr=te st
    should show content/test.php where I put the code in index.php, but when I go to that url for example it will show the exact same thing as in http://www.my-site.com/index.php because the code is not working anymore.

    If this is a host problem, I have already discussed this with my host and he has no idea what the problem is.
  • dlite922
    Recognized Expert Top Contributor
    • Dec 2007
    • 1586

    #2
    Originally posted by aznkid14
    Ok this is the situation! My host got us a new server and moved us 2 days ago. Ever since those 2 days, I've been having this problem.

    Here is the code I use:
    [PHP]<?php

    if(!$nr || $nr == "") {

    include("../forums/news.php");

    }
    else {
    include "content/$nr.php";
    }

    ?>[/PHP]

    Here is the problem. The news.php shows up fine, but whatever that is in content/something.php will not show up.

    For example:
    http://www.my-site.com/index.php?nr=te st
    should show content/test.php where I put the code in index.php, but when I go to that url for example it will show the exact same thing as in http://www.my-site.com/index.php because the code is not working anymore.

    If this is a host problem, I have already discussed this with my host and he has no idea what the problem is.

    just do a die on "content/$nr.php";

    [PHP]
    die($nr.php);
    [/PHP]

    then ask yourself, does that file exist?

    post response here if the answer is yes.

    Comment

    Working...