faqts : Computers : Programming : Languages : PHP : kms : Functions

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

16 of 23 people (70%) answered Yes
Recently 5 of 10 people (50%) answered Yes

Entry

Passing Variables with REQUIRE FUNCTION

Feb 24th, 2000 11:59
Andrew Sheh, Tim Fountain


>I tried using this code but it didn't work:

>require("list.php3?cat=adco&area=all");

>It seems this function will only take an actual file name. Is there a 
>way around this?

ANSWER
As 'require' simply puts the file in the page you're calling it from,
you can set the variables there.  Eg.:

$cat = "adco";
$area = "all";
require("list.php3");