serephent Posted February 12, 2007 Share Posted February 12, 2007 I have a page and it was running fine using an include file and without me changing anything, it's not now and I don't understand. <? include("files.$title.php"); ?> And the error is: Warning: include(filesphp) [function.include]: failed to open stream: No such file or directory in /home/.deva/quillsandink/i-sitedesign.org/view.php on line 16 Warning: include() [function.include]: Failed opening 'filesphp' for inclusion (include_path='.:/usr/local/php5/lib/php') in /home/.deva/quillsandink/i-sitedesign.org/view.php on line 16 Help? Quote Link to comment Share on other sites More sharing options...
Jessica Posted February 12, 2007 Share Posted February 12, 2007 $title isn't set. You could try <? include('files'.$title.'.php'); ?> But unless $title has a value, it won't work any better. Quote Link to comment Share on other sites More sharing options...
serephent Posted February 12, 2007 Author Share Posted February 12, 2007 It's set in my nav. This is inside of a view file. So, when you click on " view.php?title=main" it opens "view.php" with "main.php" taking the place of the include file as the content of the page, but it keeps giving that error instead. Quote Link to comment Share on other sites More sharing options...
Jessica Posted February 12, 2007 Share Posted February 12, 2007 $title = $_GET['title']; Register Globals = off Your host may have made a change. Quote Link to comment Share on other sites More sharing options...
serephent Posted February 12, 2007 Author Share Posted February 12, 2007 I'm sorry, I am still learning PHP, can you be a tad more specific? I need to change what line to what? Quote Link to comment Share on other sites More sharing options...
Jessica Posted February 12, 2007 Share Posted February 12, 2007 You need to add that in before you can use the $title variable. Quote Link to comment Share on other sites More sharing options...
The Little Guy Posted February 12, 2007 Share Posted February 12, 2007 Does it need to look like this? <? include("files/$title.php"); ?> I removed the first period, but maybe your file naming system is files.xxx.php, I don't know how your doing it though. it's my only guess Quote Link to comment Share on other sites More sharing options...
serephent Posted February 12, 2007 Author Share Posted February 12, 2007 I'm sorry, feel like a dolt over here, but add it where? On the view.php page? And add it how? Just at the top of the page? Quote Link to comment Share on other sites More sharing options...
Jessica Posted February 12, 2007 Share Posted February 12, 2007 Before...you...use...the...variable Quote Link to comment Share on other sites More sharing options...
serephent Posted February 12, 2007 Author Share Posted February 12, 2007 Working now. Thanks for the help and your patience with me. I greatly appreciate it. Quote Link to comment 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.