I get it... so instead I should use:

include("/usr/home/sites/www.walkereffects.com/web/test/include.php")

Thank you,

Steven J. Walker
Walker Effects
www.walkereffects.com
[EMAIL PROTECTED]


On Friday, June 6, 2003, at 10:08 AM, Rasmus Lerdorf wrote:


Uh, http://www.walkereffects.com/test/include.php is not a "full path
name", that is a URL. That will make an HTTP request to your web server
for /test/include.php which will of course get parsed by PHP and you will
only get the parsed output which means you won't see any variables or any
PHP tags at all for that matter. This is doing exactly what you are
asking it to do.


-Rasmus

On Fri, 6 Jun 2003, Steven Walker wrote:

Hello,

I have found troubling behavior using include() that looks like a bug.
When I specify an include file by a full path name versus a relative
path, PHP acts as though it has included the file, but variable and
constant definitions in the include file are not coming through. My
server is running PHP 4.3.1.

Here is an example:

I created a file called 'include.php', with the following contents:
        <?
                echo "include.php opened <br>"; //should print -only- if included,
right?
                $testVar = "test succeeded!";
        ?>

Then I created 'test.php', with the following contents:
<?
$testVar = "not defined"; //include.php should redefine this as 'test
succeeded!'
//include("http://www.walkereffects.com/test/include.php";); // full
path
include("include.php"); // relative path
echo $testVar;
?>


Using the relative path version of include outputs:
        include.php opened
        test succeeded!

And using the full path results in:
        include.php opened
        not defined

This doesn't seem right! Any ideas how I can work around this?

Steven J. Walker
Walker Effects
www.walkereffects.com
[EMAIL PROTECTED]

-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to