|
Posted by Shelly on 08/06/06 19:00
"Steve" <racquetballer@hotmail.com> wrote in message
news:lZmdnUqkY6xyhUvZnZ2dnUVZ_rmdnZ2d@comcast.com...
>
>
> Benjamin Esham wrote:
>>
>> It would seem that the file functions.php is not being interpreted as PHP
>> code. Check your server settings to make sure that the file is placed in
>> a
>> suitable directory for inclusion.
>
> The included file is in the same directory as the page that is including
> it, and that's the way it worked in the past. Can included files only be
> in the directory specified in php.ini?
>
>>
>> Also, you might make sure that your include file begins with <?php and
>> ends
>> with ?>. Otherwise, PHP has no way of knowing that your code is anything
>> other than plain text.
>
> That was one of the first things I checked.
>
> Here are the first few lines from the functions.php:
>
> <?
> function do_html_header($title)
> {
> // print an HTML header
> ?>
> <html>
> <head>
> <title>Shaw's Fiberglass - <?php echo $title ?></title>
> <meta http-equiv="Content-Type" content="text/html;">
> <meta name="keywords" content="fiberglass,fenders,front fenders,rear
> fenders,running boards,classic trucks,Chevy,Chevrolet,General
> Motors,GMC,Jimmy,Shaws,Shawsfiberglass,truck,trucks,replacement,custom,1941,
> 1942, 1943, 1944, 1946, 1947, 1948, 1949, 1950, 1951, 1952, 1953,
> 1954,antique,street rod,restored,truck parts,hood,hoods">
> <LINK REL=stylesheet HREF="shaw.css" TYPE="text/css">
>
>
>
> Here is the php code in the calling page:
>
> <?php
> include_once("functions.php");
>
> do_html_header("Contact Us");
> ?>
>
>
>
> And here is what is displayed in view source:
>
> <?
> function do_html_header($title)
> {
> // print an HTML header
> ?>
> <html>
> <head>
> <title>Shaw's Fiberglass - </title>
> <meta http-equiv="Content-Type" content="text/html;">
> <meta name="keywords" content="fiberglass,fenders,front fenders,rear
> fenders,running boards,classic trucks,Chevy,Chevrolet,General
> Motors,GMC,Jimmy,Shaws,Shawsfiberglass,truck,trucks,replacement,custom,1941,
> 1942, 1943, 1944, 1946, 1947, 1948, 1949, 1950, 1951, 1952, 1953,
> 1954,antique,street rod,restored,truck parts,hood,hoods">
> <LINK REL=stylesheet HREF="shaw.css" TYPE="text/css">
>
> Steve
Change the <? in the function page to <?php and see what happens.
Shelly
[Back to original message]
|