Re: Using fopen() to open a php file with variables.

From: Date: Thu, 12 Dec 2002 02:01:22 +0000
Subject: Re: Using fopen() to open a php file with variables.
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-127946@lists.php.net to get a copy of this message
if you have URL wrappers enabled, do $fp = fopen("http://path/to/your/file/$calendar_file", 'r'); On Wed, 11 Dec 2002, Jay (PHP List) wrote: > Okay, I need to retrieve the output of a php file with variables being > passed to it. Example: > > $calendar_file = "make_calendar.php3?month=$month&year=$year"; > $fp = $fp = fopen("$calendar_file", "r"); > while (!feof ($fp)) { > $buffer = fgets($fp, 4096); > $calendar_html .= $buffer; > } > fclose($fp); > > It gives me an error that the file doesn't exist, but it does. Any > suggestions? > > Jay Douglas > Systems Consultant > Fort Collins, CO > >

« previous php.general (#127946) next »