freakus_maximus Posted March 29, 2006 Share Posted March 29, 2006 Any reason why this include would not work?I am trying to include this in the real page it needs to be represent on. Obviously from the error, the proper, valid url is created and passed, but it will not open.All my other navigation options work fine, so I know it's not my case statements. If I open the edit.php manually with the defectnum value passed, that works fine too.I just need it now to work inside my index.php file...[code]case "ddrnedit": $param = $_GET['defectnum']; $activate = ('"http://localhost/releasenotes/edit.php?defectnum='. $param .'"'); break; [/code]The error is:[code]Warning: main("http://localhost/releasenotes/edit.php?defectnum=30608") [function.main]: failed to open stream: Invalid argument in C:\ITPUB KBASE\htdocs\itpublishing\index.php on line 246[/code]Line 246 is just an include() which works fine with all other 'cases':[code]<TR><TD width="180" vAlign="top"><?php include ('../includes/dashnav.php')?></TD><TD vAlign="top"><?php include ($activate);?></TD></TR>[/code] Quote Link to comment https://forums.phpfreaks.com/topic/6119-include-while-passing-a-variable-not-working/ Share on other sites More sharing options...
freakus_maximus Posted March 29, 2006 Author Share Posted March 29, 2006 Hehe...should have checked the ' and "" after the $param.This works now.[code]case "ddrnedit": $param = $_GET['defectnum']; $activate = ('http://localhost/releasenotes/edit.php?defectnum='. $param); break; [/code]Any mods on that want to go ahead and close this feel free. Quote Link to comment https://forums.phpfreaks.com/topic/6119-include-while-passing-a-variable-not-working/#findComment-22072 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.