I have a directory tree that I access via Apache (no html involved,
simply autoindex pages created by Apache. A month or two back, I
added a header declaration to the top-level .htaccess file to include
a header
<h1>Lewis's File structure</h1>
<h4>Recent updates are in /misc/unsorted</h4>
sort of thing.
So, I thought I would get cleaver, since setting a headername
overrides apache's own display of the directory path to add some php
code to the header:
<h1>Lewis's File structure</h1>
<h4>Recent updates are in /misc/unsorted</h4>
<h4>Current Directory: <?php echo $_SERVER['PHP_SOLF']; ?></h4>
This does not work, the php code doesn't resolve, and nothing is displayed
I tried changing to to a header.php file, but then nothing works, and
checking the Apache docs it clearly states that the header must return
a text type.
Getting cleaver I tried:
header.shtml:
<h1>Lewis's File structure</h1>
<h4>Recent updates are in /misc/unsorted</h4>
<!--#include file="/includes/header.php">
header.php
<h4>Current Directory: <?php echo $_SERVER['PHP_SOLF']; ?></h4>
This works, but the path displayed is, of course, always /inculdes/header.php
So, any way around this?
I'm running OS X 10.4.3 and Apache 1.3.3 and php 4.3.11
--
Lewis Butler, Owner Covisp.net
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Web-dev mailing list (
Web-dev@list...)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/web-dev/subscriber%40opensubscriber.com
This email sent to
subscriber@open...
opensubscriber is not affiliated with the authors of this message nor responsible for its content.