T
tom_sawyer70
I cannot seem to get a navigation file included for subdocuments on my
site. I am running SuSE 10 with Apache 2 and PHP. I am new to html,
php and css, but trying to learn. I'm trying to get this first page
set to use as a template for the other members.
My css is setup as a two column layout (no tables).
For the following, the files are located under:
/srv/www/htdocs/index.php
/srv/www/htdocs/web.css
/srv/www/htdocs/includes/nav.php
/srv/www/htdocs/jennifer/jennifer.php
My include path in php.ini has /srv/www/htdocs/includes in it.
My /srv/www/htdocs/index.php file is:
-----------------------------------------------
<?php $thisPage='home';?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>The Family Page</title>
<link rel="stylesheet" type="text/css" href="web.css" />
</head>
<body>
<div id="header">
<h1>The Family</h1>
</div>
<div id="nav">
<?php include ('nav.php'); ?>
</div>
<div id="content">
<h2>Welcome!</h2>
<img class="floatright" src="./jennifer/jennifer.jpg" width="90"
height="120" align="right" alt="Jennifer's Picture" />
<p>Welcome.</p>
<br></br>
<br></br>
<br></br>
<h2>Latest News and Information</h2>
<p>Improvements to this site.</p>
<h2>What's Coming Soon!</h2>
<p>More improvements to this site.</p>
</div>
</body>
</html>
----------------------------------------
This file displays correctly and my nav.php is displayed in the left
panel.
My /srv/www/htdocs/jennifer/jennifer.php file is:
<?php $thisPage='jennifer';?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>The Family Page</title>
<link rel="stylesheet" type="text/css" href="../web.css" />
</head>
<body>
<div id="header">
<h1>The Family</h1>
</div>
<div id="nav">
<?php include ("includes/nav.php"); ?>
<p>
</div>
<div id="content">
<h2>Welcome!</h2>
<img class="floatright" src="jennifer.jpg" width="90" height="120"
align="right" alt="Jennifer's Picture" />
<p>Jennifer's page</p>
<br></br>
<br></br>
<br></br>
<h2>Latest News and Information</h2>
<p>Improvements to this site.</p>
<h2>What's Coming Soon!</h2>
<p>More improvements to this site.</p>
</div>
</body>
</html>
-----------------------------------------------------
This page does not give an error, displays properly in the css format,
but the nav.php does not show in the navigation panel. Nor does any
other php statement (an echo, for example). However, if I put an html
statement there, it displays in the left panel. My display errors is
running.
If I try an info.php test file, it displays my server settings.
If I try to adjust the path to the nav.php file with ../nav.php or ../
nav.php or nav.php (since it is in the include_path), none of them
work.
I've tried dumping all of the files in the same directory as the
index.php and changed their paths and I still cannot get anything php-
related to show in the left panel (where I want the section to show).
All of the files and directories are owned by apache:website and have
the same permissions.
What am I overlooking or missing to get the php code to work within
the subfolder file?
TIA.
site. I am running SuSE 10 with Apache 2 and PHP. I am new to html,
php and css, but trying to learn. I'm trying to get this first page
set to use as a template for the other members.
My css is setup as a two column layout (no tables).
For the following, the files are located under:
/srv/www/htdocs/index.php
/srv/www/htdocs/web.css
/srv/www/htdocs/includes/nav.php
/srv/www/htdocs/jennifer/jennifer.php
My include path in php.ini has /srv/www/htdocs/includes in it.
My /srv/www/htdocs/index.php file is:
-----------------------------------------------
<?php $thisPage='home';?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>The Family Page</title>
<link rel="stylesheet" type="text/css" href="web.css" />
</head>
<body>
<div id="header">
<h1>The Family</h1>
</div>
<div id="nav">
<?php include ('nav.php'); ?>
</div>
<div id="content">
<h2>Welcome!</h2>
<img class="floatright" src="./jennifer/jennifer.jpg" width="90"
height="120" align="right" alt="Jennifer's Picture" />
<p>Welcome.</p>
<br></br>
<br></br>
<br></br>
<h2>Latest News and Information</h2>
<p>Improvements to this site.</p>
<h2>What's Coming Soon!</h2>
<p>More improvements to this site.</p>
</div>
</body>
</html>
----------------------------------------
This file displays correctly and my nav.php is displayed in the left
panel.
My /srv/www/htdocs/jennifer/jennifer.php file is:
<?php $thisPage='jennifer';?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>The Family Page</title>
<link rel="stylesheet" type="text/css" href="../web.css" />
</head>
<body>
<div id="header">
<h1>The Family</h1>
</div>
<div id="nav">
<?php include ("includes/nav.php"); ?>
<p>
</div>
<div id="content">
<h2>Welcome!</h2>
<img class="floatright" src="jennifer.jpg" width="90" height="120"
align="right" alt="Jennifer's Picture" />
<p>Jennifer's page</p>
<br></br>
<br></br>
<br></br>
<h2>Latest News and Information</h2>
<p>Improvements to this site.</p>
<h2>What's Coming Soon!</h2>
<p>More improvements to this site.</p>
</div>
</body>
</html>
-----------------------------------------------------
This page does not give an error, displays properly in the css format,
but the nav.php does not show in the navigation panel. Nor does any
other php statement (an echo, for example). However, if I put an html
statement there, it displays in the left panel. My display errors is
running.
If I try an info.php test file, it displays my server settings.
If I try to adjust the path to the nav.php file with ../nav.php or ../
nav.php or nav.php (since it is in the include_path), none of them
work.
I've tried dumping all of the files in the same directory as the
index.php and changed their paths and I still cannot get anything php-
related to show in the left panel (where I want the section to show).
All of the files and directories are owned by apache:website and have
the same permissions.
What am I overlooking or missing to get the php code to work within
the subfolder file?
TIA.