Jump to content

[SOLVED] PHP Include rewrite


ev5unleash

Recommended Posts

Hey Guys,

 

I've been using PHP Include a lot for website navigation. Now, Ever since I've updated my PHP server the PHP code I've been using doesn't work. Could anyone rewrite it so it does? I don't have the option of downgrading at this point.

 

<?php

include('indextop.php');

if( !isset($_GET['id']) )
{
    $xid = 'default';
}
else
{
    $xid = strtolower($_GET['id']);
}
switch($xid)
{
case 'services':
  include('services.php');
break;
case 'default':
  include('indexhome.php');
break;
case 'about':
  include('about.php');
break;
case 'teacherauth':
  include('pages/teacherresources/auth.php');
break; 
}

include('indexbot.php');

?>

 

Thanks

Link to comment
https://forums.phpfreaks.com/topic/155289-solved-php-include-rewrite/
Share on other sites

I get this message

Warning: include(services.php) [function.include]: failed to open stream: No such file or directory in C:\wamp\www\websites\techsupport\index.php on line 16

Warning: include() [function.include]: Failed opening 'services.php' for inclusion (include_path='.;C:\php5\pear') in C:\wamp\www\websites\techsupport\index.php on line 16

 

And services is right next to the index.php file.

 

What's going wrong?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.