Jump to content

Include and links help


kl_75

Recommended Posts

Hi,

 

I'm new to PHP and I have a problem and I hope this is the right place for this question.

Sorry for my bad english  :-\

 

I've made a homepage in PHP.

I use php include instead of Iframes.

 

The problem is that my links don't work. I get this when klick on them:

 

Warning: include(.php) [function.include]: failed to open stream: No such file or directory in /home/dinkokbo/public_html/nextgear/index.php on line 129

 

Warning: include(.php) [function.include]: failed to open stream: No such file or directory in /home/dinkokbo/public_html/nextgear/index.php on line 129

 

Warning: include() [function.include]: Failed opening '.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/dinkokbo/public_html/nextgear/index.php on line 129

 

 

This is my code:

 

<?php

$content = "start.php";

if (!empty($_GET['c'])) {

$content = $_GET[' c '] . '.php';

}

include ($content);

?>

 

And this is my link: index.php?c=start

 

What have I done wrong.

Boy that was hard to explain in english :)

 

Thank you for your help

 

Kaj

 

 

Link to comment
https://forums.phpfreaks.com/topic/171877-include-and-links-help/
Share on other sites

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.