php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #8835 Include's & passing varibles on Win*
Submitted: 2001-01-22 07:18 UTC Modified: 2001-01-22 12:58 UTC
From: AmaZed at charter dot net Assigned:
Status: Closed Package: Feature/Change Request
PHP Version: 4.0.4 OS: Win2k
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: AmaZed at charter dot net
New email:
PHP Version: OS:

 

 [2001-01-22 07:18 UTC] AmaZed at charter dot net
Ok I was tring to include a file and tring to pass a var, tried many ways.. needless to say I couldnt get it to work.
<?php inlcude("links.php?show=true"); ?> -- no good
<?php include("http://www.amazed.to/links.php?show=true"); ?> -- no good
So I get on IRC, no on really had a answer for my question 'Why cannt I include, and pass varibles on a windows server?'
bug list: http://bugs.php.net/bugs-php3.php?id=514 says you cannt include("http://server/file.php") if you cannt include a server, how can you pass a var through include? I am not sure if you consider this a 'bug' but, it would be nice to include & passing vars ;\


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-01-22 12:58 UTC] rasmus@php.net
This makes no sense.  Included files share the same scope as the script that is doing the including.  So:

$a = 1;
include 'somefile.php';

If in somefile.php you do: echo $a
you will see it prints 1.  So passing variables to an included file is an inherent characteristic of PHP.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu May 08 01:01:27 2025 UTC