Okay, I need to retrieve the output of a php file with variables being
passed to it. Example:
$calendar_file = make_calendar.php3?month=$monthyear=$year;
$fp = $fp = fopen($calendar_file, r);
while (!feof ($fp)) {
$buffer = fgets($fp, 4096);
$calendar_html .= $buffer;
}
Okay, I need to retrieve the output of a php file with variables being
passed to it. Example:
$calendar_file = make_calendar.php3?month=$monthyear=$year;
$fp = $fp = fopen($calendar_file, r);
while (!feof ($fp)) {
$buffer = fgets($fp, 4096);
$calendar_html .= $buffer;
}
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 =
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=$monthyear=$year;
$fp = $fp = fopen($calendar_file, r);
Oh my! That's not going to work, because
Why don't you just use include?
$month = 12;
$year = 2002;
// This include has access to the above variables
include 'make_calendar.php3';
Include it wherever you intended to print $caledar_html.
It doesn't exist in your code because the url is seen as
part of the filename.
Regards,
5 matches
Mail list logo