kl_75 Posted August 26, 2009 Share Posted August 26, 2009 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 Quote Link to comment https://forums.phpfreaks.com/topic/171877-include-and-links-help/ Share on other sites More sharing options...
wildteen88 Posted August 26, 2009 Share Posted August 26, 2009 $_GET[' c '] should be just $_GET['c'] PHP will see $_GET[' c '] as a completely different variable. Quote Link to comment https://forums.phpfreaks.com/topic/171877-include-and-links-help/#findComment-906900 Share on other sites More sharing options...
kl_75 Posted August 26, 2009 Author Share Posted August 26, 2009 THANK YOU SO MUCH! You are a lifesaver Quote Link to comment https://forums.phpfreaks.com/topic/171877-include-and-links-help/#findComment-906918 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.