Reply to Re: Error - Cannot pass paramter --> Failed to open stream

Your name:

Reply:


Posted by Andy Hassall on 12/16/52 11:59

On 29 Sep 2006 11:41:09 -0700, "One" <david.hunter@gmail.com> wrote:

>I have a main.php file that calls a php navigation menu.
>
>I want to pass the menu file a parameter to tell it which menu to
>display.
>
>Inside the main.php I have :
> include "/home/ottadca1/public_html/includes/leftnav.php?menuid=dave";

You can't do that. "?" is for URLs, but you're specifying a filename. With the
"?", you're specifying a filename that doesn't exist.

If you want to pass variables into the include file, just set them before you
do the include, they'll be visible in the include file. (Or pass them as
parameters to whatever functions you define in the include file).

--
Andy Hassall :: andy@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация