I need PHP help, please? :p 10 points?

Ethan

New member
I have 2 files. One is a php file (index.php) that contains this:

<?php
$member = substr(dirname($_SERVER['PHP_SELF']), 8); // This shows the name of the directory
include 'http://www.EXAMPLE.com/users/member.php';
?>

The other file (member.php, the file being included) contains only this:

<? print $member; ?>

For some reason, this code doesn't work. I've already tried just printing $member on index.php and it works, so why doesn't it work when it's included from member.php? Is there a way around this so I can print something from index.php on member.php? Thanks for the help!
I made a typo. I meant to say that $member works on member.php, but not on index.php which is where I need it.
Julie, let me try to make it clear. I need the directory that index.php is in to be displayed in member.php. How can I do that? I already have the code for displaying the directory. It works, and it is in index.php. I need to be able to use it in member.php though
 
Back
Top