Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.