|
Posted by Rik on 08/15/07 13:22
On Wed, 15 Aug 2007 15:17:47 +0200, Jerim <wyount@gmail.com> wrote:
> I have a PHP script which simply calls another PHP script using
> include(). Let's call them website.php and website_include.php, with
> website.php simply including website_include.php. I can pass the
> variable to website.php fine. Using an echo command, I can see that it=
> has the complete phrase such as "Permission Denied." When I call the
> website_include.php, which is the page that actually does all the
> work, the variable has changed to just "Permission." This happens with=
> any phrase I send. I am using the following syntax to call
> website_include.php:
>
> include("http://www.domain.com/website_include.php?variable=3D$phrase)=
Really try to use the local filesystem if you can, not a roundabout by =
HTTP. It's unneccessary and cumbersome in most cases.
Your problem is in this case you should have urlencoded() the $phrase, =
spaces are _not_ valid in the query string of an url.
Much easier would be:
website.php
<?php
$phrase =3D 'Test this.';
include('./website_include.php');
?>
website_include.php
<?php
echo $phrase;
?>
-- =
Rik Wasmus
Navigation:
[Reply to this message]
|