Help - Search - Members - Calendar
Full Version: Ugh.
Zymic Webmaster Forums > Web Design & Development > Server Side Scripting > PHP
Colin
I am trying to use this code
CODE
<?php
    $page = @$_GET['page'];
    if(empty($page))
    {
        $page = 'home';
    }
    else {
        $page = $_GET['page'];
    }
    switch($page)
    {
        default:
            include('home.php');
        break;
        case "1":
            include('home.php');
        break;
    }
    ?>

And this comes up:
QUOTE
No input file specified.

What am I doing wrong?
Ed
Does 'home.php' actually exist?
Colin
Yes
MrTouz
may i ask you what this code does ?

is it like the code wich you put home instead of home.php in the adress bar ?
Colin
yeah like index.php?page=home
Ed
Paste what is in 'home.php'.
Colin
CODE
  <!-- Content unit - One column -->
        <div class="column1-unit">
          <h1Home</h1>                            
          <p>HOME!</p>
Ed
Well the php seems fine as does the home.php, is this on Zymic host? Seems to the point to the environment.

You only need the switch statement though, anything that is not in the switch falls back to the default statement.
Colin
No its not on zymic its on downthe.net hosting...
Here is phpinfo if that can help:
http://www.colinsmiley.net/phpinfo.php
Ed
Yep, their problem. Check your .htaccess... other than that, it's their problem. They / you probably have a path incorrect, because it's ran as CGI if the path is incorrect it can't find the include file and you receive that error.

You could try :

CODE
<?php
ini_set('include_path',ini_get('include_path').':/your/full/path/to/your/directory:');


Or you could just come back and use Zymic's awesome hosting where this problem wouldn't exist ;-)
Colin
Lol well I would but I like cpanel and co-own downthe.NET ...What could I do as a Web Hosting Manager to fix this?
Well I tried going back to php4 and it works now...:
http://www.downthe.net/forums/viewtopic.php?f=51&t=1004
When you said that about .htaccess thing it made me think and so I tried...thanks lol
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2012 Invision Power Services, Inc.