Danny Brow wrote:
<snip>
function html_template() {
global $item_pics1;
if (file_exists('item.html')) {
print "This is item_pics1" . $item_pics1;
$html_template = $GLOBALS['html_template'];
$html_template = str_replace('{item_pictures}', $item_pics1,
$html_template);
$html_template = str_replace('{title}', $GLOBALS['title'],
$html_template);
$html_template = str_replace('{description}',
$GLOBALS['descrip'], $html_template);
$html_template = str_replace('{price}', $GLOBALS['price'],
$html_template);
$item_file_name = $GLOBALS['root_dir'] . "/" . $GLOBALS['dir'] .
"/item.html";
$item_fh = fopen($item_file_name, 'x+');
fwrite($item_fh, $html_template); } else {
$GLOBALS['errors'] .= "item.html template does not exsit";
}
}



So what is the function doing or not doing? If 'index.html' isn't in the same directory as the script, it will evaluate to false and the only code the function will execute is...


$GLOBALS['errors'] .= "item.html template does not exsit";

Maybe do a print_r ( $GLOBALS ) inside the function to make sure the values you're looking for are actually there.

--
John C. Nichel
ÜberGeek
KegWorks.com
716.856.9675
[EMAIL PROTECTED]

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to