Jump to content


Photo

Include while passing a variable not working


  • Please log in to reply
1 reply to this topic

#1 freakus_maximus

freakus_maximus
  • Members
  • PipPipPip
  • Advanced Member
  • 177 posts

Posted 29 March 2006 - 07:23 PM

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

case "ddrnedit":
   $param = $_GET['defectnum'];
   $activate = ('"http://localhost/releasenotes/edit.php?defectnum='. $param .'"');    
  break;  

The error is:
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

Line 246 is just an include() which works fine with all other 'cases':
<TR>
<TD width="180" vAlign="top"><?php include ('../includes/dashnav.php')?></TD>
<TD vAlign="top"><?php include ($activate);?></TD>
</TR>


#2 freakus_maximus

freakus_maximus
  • Members
  • PipPipPip
  • Advanced Member
  • 177 posts

Posted 29 March 2006 - 08:07 PM

Hehe...should have checked the ' and "" after the $param.

This works now.

case "ddrnedit":
   $param = $_GET['defectnum'];
   $activate = ('http://localhost/releasenotes/edit.php?defectnum='. $param);     
  break;  

Any mods on that want to go ahead and close this feel free.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users