require_once('chunk') echos script instead of executing it

To simplify a large script I stored a chunck as’ PrepCntryStat.inc’ and replaced it in the original script as …

require_once ‘PrepCntryStat.inc’.
Now IE echos the chunck instead of executing it. Why?

Original chunk is …

<?php $a = Array(); // array holds country-choice options and their 2-char codes $a[" "] = ''; $fh = fopen("http://www.u-sit.net/auxlib/web07/InclReq/kvpisow2.txt", "r"); while ($buffer = fgets($fh)) { $kvp = preg_split ("/[\s,]+/", $buffer); $a["$kvp[1]"] = $kvp[3] . " " . $kvp[4] . " " . $kvp[5] . " " . $kvp[6] . " " . $kvp[7] . " " . $kvp[8]; } fclose ($fh); ?>

IE echos verbatum script shown above. Why?
Ideas appreciated; usit

GOT IT!!
(rather embarassing though >:(
usit

Awesome, you saved me the trouble of going through all that and not being able to help you :stuck_out_tongue:

Sponsor our Newsletter | Privacy Policy | Terms of Service