l i n u x - u s e r s - g r o u p - o f - d a v i s
L U G O D
 
Next Meeting:
October 20: Web Application Hacking: How to Make and Break Security on the Web
Next Installfest:
TBD
Latest News:
Oct. 10: LUGOD Installfests coming again soon
Page last updated:
2002 Dec 09 15:11

The following is an archive of a post made to our 'vox-tech mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
[vox-tech] PHP Include File Problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[vox-tech] PHP Include File Problem



Hi All,

I just started to learn PHP and need help with 
an include file. Below are 3 test files.

The 4th line of html_header, ie. the xml declaration,
creates a parse error:

   parse error in [snip]/html_header.php on line 4
   
When the line is removed, no parse error and the page 
displays with all vars populated properly.

Somehow I need to escape those pesky characters or ???

RedHat 7.2, PHP 4.0.6, Mozilla 0.9

Thanks,
Jim


# ---------- include.php, called from browser
<?php

$css_ref	= "../africa_loc.css";
$h1		= "Sample H One Heading";
$h2		= "An H Two Heading";
$footer_subject	= "$h1, $h2";
$home_page	= "http://jima9.tripod.com/fam/index.html";;

include("html_header.php");
html_header_10_strict( $css_ref, $h1, $h2 );

include("html_footer");
?>
# ----------


# ---------- html_header.php, called from include.php
<?php
function html_header_10_strict ( $css_ref, $h1, $h2 )
{
?>
<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Strict//EN"
  
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
<html xmlns="http://www.w3.org/1999/xhtml";>
<head>
<meta name="robots" content = "noindex, nofollow" />
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1" />

<link rel="stylesheet" type="text/css" href="<?php
echo "$css_ref"; ?>" />
<meta name="keywords" content="one, " />
<title><?php echo "$h1"; ?></title>
</head>

<body lang="en">
<div class="pane">
<h1><?php echo "$h1"; ?></h1>
<h2><?php echo "$h2"; ?></h2>
<?php
}
?>
# ---------- 


# ---------- html_footer, called from include.php
</div>

<p class="footer">
Please report errors, typos, or problems to <a href= 
"mailto:jimajima9@yahoo.com?subject = <?php echo
"$footer_subject"; ?>">
jimajima9@yahoo.com</a><br />
Visit the <a href="<?php echo "$home_page"; ?>">home
page</a> of this site.
</p>

</body></html>
# ----------


__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
_______________________________________________
vox-tech mailing list
vox-tech@lists.lugod.org
http://lists.lugod.org/mailman/listinfo/vox-tech



LinkedIn
LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
facebook
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
Appahost Applications
For a significant contribution towards our projector, and a generous donation to allow us to continue meeting at the Davis Library.