It seems that if I create a php file in my dir at my hosting provider and do
include('/etc/passwd'); then wow, I see the contents of etc/passwd!
Is this expected behavior???
I am looking at creating a script that takes a var in the url and includes
the requested file. The purpose would be for on
Thanks! Works perfect with double quotes!
RC
-Original Message-
From: Tom Rogers [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 12, 2002 8:21 AM
To: Ronald Clark
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] "include" question
Hi,
Friday, December 13, 2002, 12:07:05 AM,
Hi,
Friday, December 13, 2002, 12:07:05 AM, you wrote:
R> Hello all,
R> I am passing a variable like so:
R>
R> On the "link.php" page, I have this simple code:
R> $job = $_GET['foo'];
R> echo "$job"; // for error checking
R> include 'path/to/$job';
?>>
R> The 'echo "$job";' statement works
Variables don't get parsed in single quotes, use double quotes.
RClark wrote:
Hello all,
I am passing a variable like so:
On the "link.php" page, I have this simple code:
$job = $_GET['foo'];
echo "$job"; // for error checking
include 'path/to/$job';
?>
The 'echo "$job";' statement works
Hello all,
I am passing a variable like so:
On the "link.php" page, I have this simple code:
The 'echo "$job";' statement works just fine, but the outbout for the
include statement looks like this:
bar.php
Warning: Failed opening 'scripts/$job' for inclusion
(include_path='.:/usr/local/lib/php
t 19:48, Mike D wrote:
> How do I find the PHP include dir?
>
> I looked in the .ini file but it appears that the include dir
directive
> is commented out, here it is:
>
> ; UNIX: "/path1:/path2"
> ;include_path = ".:/php/includes"
>
> Do I need t
in your web
document directory
HTH
On Wed, 2002-11-13 at 19:48, Mike D wrote:
How do I find the PHP include dir?
I looked in the .ini file but it appears that the include dir
directive
is commented out, here it is:
; UNIX: "/path1:/path2"
;include_path = ".:/php/includes"
Do I nee
d add that directory to your include_path like so:
include_path=".:/usr/local/php/config_scripts"
And now you can access those scripts from your php scripts in your web
document directory
HTH
On Wed, 2002-11-13 at 19:48, Mike D wrote:
> How do I find the PHP include dir?
>
> I l
How do I find the PHP include dir?
I looked in the .ini file but it appears that the include dir directive
is commented out, here it is:
; UNIX: "/path1:/path2"
;include_path = ".:/php/includes"
Do I need to uncomment this?
Thanks
Mike
Mike Dunlop
Webmaster - AWN, Inc.
> On Tuesday 12 November 2002 15:55, Fikret CAN wrote:
> > hello PHP developers,
> >
> > I am going to convert a site that works with frames to the equivalent
with
> > includes. I have several template files whic behaves according to query
> > string parameters. I don't want to make big changes, ju
On Tuesday 12 November 2002 15:55, Fikret CAN wrote:
> hello PHP developers,
>
> I am going to convert a site that works with frames to the equivalent with
> includes. I have several template files whic behaves according to query
> string parameters. I don't want to make big changes, just make it w
hello PHP developers,
I am going to convert a site that works with frames to the equivalent with includes. I
have several template files whic behaves according to query string parameters. I don't
want to make big changes, just make it work.
Is that possible?
I lasltly consider the solutions th
> Warning: Failed opening '/common.php' for inclusion
> (include_path='.:/www/htdocs/php:/www/htdocs') in
> /www/htdocs/php/includetest.php on line 3
Take out the forward slash in your include. '/common.php' means to look in
the root directory for the file, while if you just put 'common.php' or
'.
I am trying to use include statements, but am having no luck. I set the
include path in php.ini to include directories of the files, I tried CHMOD
777 on both files, and I restarted the server.
I can't get any include files working. I got this message:
Warning: Failed opening '/common.php' for
In order to use your PHP script (authentication features etc) you need
to have the all files within the same server.
As of including files, virtually - yes, yo can use include for remote
files, but you will not be able to execute the remote PHP code. You will
only include the output. ie: include
Hi,
I wrote a program to authenticate users. I would like to place a few lines
at the top a webpage that would call this program. Some web pages will be
on the same server as the authentication program, others will not.
Can I use include/require of do I need to use fopen? The program returns
You can include as many files as you want (or manage to), but you can
declare functions only once.
So include your files declaring functions using require_once();
Matias Silva wrote:
>This might sound like a dumb question but I just need verification so that
>I can convince myself that I'm goin
This might sound like a dumb question but I just need verification so that
I can convince myself that I'm going insane!
I have this error in which I include 3 files (common_html.inc,
common_db.inc, common_functions.inc)
well I have a clean() function in the common_functions.inc file. But it
seems
[snip]
On line "6", I have the list of musicians in the song.
Example (ignore the quotes): "Doyle Lawson -- lead vocal; Dale Perry -- bass
vocal"
Is there a way to make it so that, when I include line 6 in my PHP template,
the ";" will be replaced with a line break so I get one musician per line i
> On line "6", I have the list of musicians in the song.
> Example (ignore the quotes): "Doyle Lawson -- lead vocal; Dale Perry -
> - bass vocal"
> Is there a way to make it so that, when I include line 6 in my PHP
> template, the ";" will be replaced with a line break so I get one
> musician per
I have a series of text files that are set up with each line being a
different field. Line "0" is song title, "1" is artist, "2" is album, and so
forth. I know how to use PHP to include those files in an HTML template so
that I don't have to make a separate page for each song, however, I do have
t
Chuck PUP Payne wrote:
>By the way I have time this but what is happen and maybe this will clear up
>things.
>
That certainly made things clear. :-)
>I only calling this first myrow call titles. It's not going on to
>the other two. Now in my php page I have this...
>
>$myrow = mysql_fetch_array
Is this to pull the rows out of a database??
You could start with a simple example, which is just a basic config setting,
and use the $myrow array in your sql while loop to do a lot of the work.
$value)
{
echo "{$key}: {$value}\n";
}
echo "\n";
}
?>
For the abov
By the way I have time this but what is happen and maybe this will clear up
things. I only calling this first myrow call titles. It's not going on to
the other two. Now in my php page I have this...
$myrow = mysql_fetch_array($result);
$row;
Now this doesn't work. But this does.
$myrow = mysql
What I was wanting to do was store the myrows under let say, db_info.inc
file. So that I can add or delete what myrows I want to call on.
I am thinking this what I need to do...
Function row ($row) { //These are the rows to call on...
$title = $myrow[title];
$format = myrow[format];
> -Original Message-
> From: Chuck PUP Payne [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, September 29, 2002 1:29 AM
> To: PHP General
> Subject: [PHP] Include Part 2
>
> Ok, I am trying to make my design a lot easier. I want to know if I
can do
> this...
>
&
Chuck \"PUP\" Payne wrote:
>Hi,
>
>I am trying to start using inc files. But I am this this error
>
>Warning: Failed opening '/local/htdocs/movies/style.inc' for inclusion
>(include_path='.:/usr/share/php') in /local/htdocs/movies/lmenu.php on line
>3
>
>I have this in my lmenu.php
>
>Include
Not sure I fully understand, but usually this stuff calls for either a
function, or an included file of code... in your case, sounds like a
function is required, but I may not fully understand...
Regards,
Justin
on 29/09/02 3:29 PM, Chuck PUP Payne ([EMAIL PROTECTED]) wrote:
> Ok, I am trying
Ok, I am trying to make my design a lot easier. I want to know if I can do
this...
I want to set up in my php page this...
$rows;
Under my db_info.inc I want to store this so that I can add delete from it.
$row = "$title = myrow[title]; $format = myrow[format]; $category =
myrow[category];"
Chuck,
It is likely that either:
1. That file does not exist.
2. PHP does not have read privileges on that file.
Chris
Chuck PUP Payne wrote:
>I am trying to start using inc files. But I am this this error
>
>Warning: Failed opening '/local/htdocs/movies/style.inc' for inclusion
>(include
Hi,
I am trying to start using inc files. But I am this this error
Warning: Failed opening '/local/htdocs/movies/style.inc' for inclusion
(include_path='.:/usr/share/php') in /local/htdocs/movies/lmenu.php on line
3
I have this in my lmenu.php
Include ("/local/htdocs/movies/style.inc");
S
Hi,
I am trying to start using inc files. But I am this this error
Warning: Failed opening '/local/htdocs/movies/style.inc' for inclusion
(include_path='.:/usr/share/php') in /local/htdocs/movies/lmenu.php on line
3
I have this in my lmenu.php
Include ("/local/htdocs/movies/style.inc");
S
pb : include a php file in an other php file
contraints : the php file must be interpreted before being included
solution known : fsock then get the html code from the server and include
it...
Is there an other solution (easier) to include that file?
thx for your help!
You
--
PHP General
[EMAIL PROTECTED]
> Subject: [PHP] include() from another sub-domain
>
>
> Hello,
>
> I've searched the list and the manual and am still a bit confused.
> Here's what I'd like to do. We have a bunch of internal sites that all
> use the same username/password. One
Apache
On 19 Aug 2002, Greg Macek wrote:
> Well, that would make sense. Now is this something I need to configure
> in the Apache or the PHP config file?
>
> On Mon, 2002-08-19 at 14:27, Rasmus Lerdorf wrote:
> > If these domains are on the same physical server, include them directly
> > via the
Well, that would make sense. Now is this something I need to configure
in the Apache or the PHP config file?
On Mon, 2002-08-19 at 14:27, Rasmus Lerdorf wrote:
> If these domains are on the same physical server, include them directly
> via the full filesystem path. If they are actually on diffe
If these domains are on the same physical server, include them directly
via the full filesystem path. If they are actually on different physical
machines, you will need to configure those other machines to let you get
the non-parsed PHP code through them. Your problam right now is that the
site2
Hello,
I've searched the list and the manual and am still a bit confused.
Here's what I'd like to do. We have a bunch of internal sites that all
use the same username/password. One is already setup with a function to
authenticate this to a database. However, each login page is coming from
a diffe
> From: Jay Blanchard [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, August 15, 2002 1:19 PM
> To: [EMAIL PROTECTED]
> Subject: RE: [PHP] include opens source, but it shouldn't
>
>
> [snip]
> Only on demand.
> I'd like to define the variable without
[snip]
Only on demand.
I'd like to define the variable without showing the file
$var=include();
do something else
echo $var;
[/snip]
Since the included file outputs headers you cannot do what it is you wish to
do AFAIK. When I do includes, and having looked at other's code I can say
that I am
;?
- Original Message -
From: "Jay Blanchard" <[EMAIL PROTECTED]>
To: "'Jay Blanchard'" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, August 15, 2002 7:03 PM
Subject: RE: [PHP] include opens source, but it shouldn
[snip]
Are you wanting to place the file into the variable so that you can echo it
out later? That is an extra step that you do not need. Just place the
include() function where you want it to appear.
But what do if i want echo it out later -> That's exactly what i want do
[/snip]
You mean more
[snip]
[snip]
What is in the file? Do you have a print($file) or echo somewhere? Does the
included file have print() or echo() in it?
No, in the file is only html
[/snip]
There you go ... HTML will be parsed by the browser and displayed. So it is
doing exactly what it is supposed to do.
[/snip]
[snip]
What is in the file? Do you have a print($file) or echo somewhere? Does the
included file have print() or echo() in it?
No, in the file is only html
[/snip]
There you go ... HTML will be parsed by the browser and displayed. So it is
doing exactly what it is supposed to do.
HTH!
Jay
Im
tever text you assigned to it.
This is covered in the manual,
Jason
-Original Message-
From: Sascha Braun [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 15, 2002 10:31 AM
To: PHP Mailingliste; Jay Blanchard
Subject: Re: [PHP] include opens source, but it shouldn't
Can't yo
into an array? -
Will it be parsed later on?
Schura
- Original Message -
From: "Jay Blanchard" <[EMAIL PROTECTED]>
To: "'Harry.de'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Thursday, August 15, 2002 6:25 PM
Subject: RE: [PHP] include op
[snip]
why does include always opens my included file
although it is defined as a variable
Example:
$file=include(/myfile/myfile.txt/);
shouldn't it only be opend by typing
echo $file;
[/snip]
The include() opens the file to place it in the variable, in other words
include means READ INTO. Th
why does include always opens my included file
although it is defined as a variable
Example:
$file=include(/myfile/myfile.txt/);
shouldn't it only be opend by typing
echo $file;
?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/
I'm not sure about others, but I am glad this behavior is like this.
It is very nice for modules to "stand on their own" so to speak, so that
you don't have to worry about what context they are used in. If the file
you are including is plain HTML, would you want it to be parsed as if it
were P
f "HTML mode" within the function that this
problem arises.
Thanks again
Mike.
-Original Message-
From: Bas Jobsen [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 15 August 2002 6:52 AM
To: Mike Eales; [EMAIL PROTECTED]
Subject: Re: [PHP] Include/require and the HTML Code
>
Mike,
i had no problems with this..
# Do things
LogBook
http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
> Can anybody tell me why I get a "Parse error: parse error,
> unexpected '}' in /usr/local/apache/htdocs/logbook/Functions.inc on line
begin and end your include files with
bllaalla
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
: <[EMAIL PROTECTED]>
Sent: Wednesday, August 14, 2002 10:44 AM
Subject: [PHP] Include/require and the HTML Code
> Hi,
>
> Can anybody tell me why I get a "Parse error: parse error,
> unexpected '}' in /usr/local/apache/htdocs/logbook/Functions.inc on li
Hi,
Can anybody tell me why I get a "Parse error: parse error,
unexpected '}' in /usr/local/apache/htdocs/logbook/Functions.inc on line
17 "
for the following code:
Appreciate any help.
Using PHP 4.2.2 and Apache 1.3.26 on Redhat 7.3 x86
(The "" stuff is not part of the code. ind
Huy,
Use Editplus, or something similar, not Notepad. Costs $45 and makes your
work *much* easier.
Miles
At 08:41 AM 8/13/2002 -0700, Huy wrote:
>Thanks,
>
>I thought I checked that already. Obviously, I use notepad in Win2000 to
>edit the files, and save them as Unicode file, which Notepad p
Thanks,
I thought I checked that already. Obviously, I use notepad in Win2000 to
edit the files, and save them as Unicode file, which Notepad put some
characters at the beginning of the file. Only when I use another editor was
I able to see those strange characters. After deleting them, the requi
On Tue, 2002-08-13 at 02:55, Huy wrote:
> But I do...
>
> If I left out the require statement all is well.. or I copy the whole
> content of the included file.. it works fine. The problem is the require
> statement.
Check the file for whitespace, anything outside ?>..http://www.php.net/)
To
But I do...
If I left out the require statement all is well.. or I copy the whole
content of the included file.. it works fine. The problem is the require
statement.
"James Green" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> On Mon, 2002-08-12 at 22:14,
On Mon, 2002-08-12 at 22:14, Huy wrote:
> If I use either the include or require statement, PHP will generate some
> lines in the browser. For example, I want the first line is Hello There..
> echo ("Hello There"); but the line happens to be the third line after some
> blank lines. So how do I tur
If I use either the include or require statement, PHP will generate some
lines in the browser. For example, I want the first line is Hello There..
echo ("Hello There"); but the line happens to be the third line after some
blank lines. So how do I turn that off??
--
PHP General Mailing List (ht
]
> > Sent: Wednesday, September 04, 2002 12:53 AM
> > To: [EMAIL PROTECTED]
> > Subject: Re: [PHP] Include problems
> >
> > does the "require" has something to be with "include" ?
> > Cause instead of using "include" im always usin &quo
]]
> Sent: Wednesday, September 04, 2002 12:53 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] Include problems
>
> does the "require" has something to be with "include" ?
> Cause instead of using "include" im always usin "require"
>
rectory to
> your
> > include_path (in the c:\winnt\php.ini file).
> >
> >
> > Daniel Kushner
> > [EMAIL PROTECTED]
> >
> > Need hosting? http://www.TheHostingCompany.us/
> >
> > > -Original Message-
> > > From: Scott [mailt
the c:\winnt\php.ini file).
>
>
> Daniel Kushner
> [EMAIL PROTECTED]
>
> Need hosting? http://www.TheHostingCompany.us/
>
> > -Original Message-
> > From: Scott [mailto:[EMAIL PROTECTED]]
> > Sent: Saturday, August 03, 2002 3:11 PM
> > To: [EMAIL PRO
> Sent: Saturday, August 03, 2002 3:11 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Include problems
>
>
> I have PHP4 on both a windows IIS server and a windows apache server. The
> include function only works in the same directory of the file I wish to
> access.
>
> ex. w
I have PHP4 on both a windows IIS server and a windows apache server. The
include function only works in the same directory of the file I wish to
access.
ex. www.include.com/default.php
all files in same directory (i guess the root)?
everything works fine. Here's where I have the problem.
N
http://www.php.net/eval
- Original Message -
From: "Alawi" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, August 03, 2002 11:41 AM
Subject: [PHP] Include php code as variable
> How can I Include my php code code as variable and excute it ?
How can I Include my php code code as variable and excute it ?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
> If you run your own server, you can set it up so that each webmaster is
> locked into a private environment, but it's messy. According to me, you
> would need a separate copy of apache for each site, each running under a
> different user, and they would need to run on separate ports, which is a
On Friday 02 August 2002 10:41 am, lallous wrote:
> I mean this:
>
> i have this tree:
>
> ./libs/*.php
> ./user/file1.php
>
> now i'm in ./user/ directory
> i run file1.php
> it includes ../libs/lib1.php which in turn will include helper.php
> (./users/helper.php) <-- will fail!
>
> how can i pro
In article <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] (Lallous) wrote:
> how can i programmatically set the include path?
http://php.net/ini-set
--
CC
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
D. Budiardja" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
On Friday 02 August 2002 10:02 am, lallous wrote:
> I have this:
> //file1.php
> include('../libs/lib1.php');
> ?>
> now lib1.php:
> include ('hel
On Friday 02 August 2002 10:02 am, lallous wrote:
> I have this:
> //file1.php
> include('../libs/lib1.php');
> ?>
> now lib1.php:
> include ('helper.php');
> ?>
> If i run file1.php ->includes lib1.php -> fails to include helper.php !
I have this:
//file1.php
now lib1.php:
If i run file1.php ->includes lib1.php -> fails to include helper.php ! !
how can i solve that?
p.s: currently, i'm chdir()ing to the ../libs path, then i return to current
dir...
my code cannot make use of Apache's help. (like setting the include path
to the extract resources (e.g.
memory & CPU time) required to run the muliple instances.
Cheers
Lee
- Original Message -
From: "Simon Ritchie" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, August 01, 2002 11:30 AM
Subject: RE: [PHP] include()
&
> "Other users on the same server *shouldn't* be able to include() in this
way"
>
> How?
>
> Would their $_SERVER['HTTP_HOST'] not be the same?
You did not specify your circumstances in your original posting, so there is
some confusion.
One web server can handle many domains. An ISP offering s
> > I suppose include() can be used to include files from remote
> > systems(not on
> > WINDOWS).
>
> Only if the sysadmin running your web server allows it, which they should
> not.
>
>
> > A webmaster on the same server can always use a path like
> > "/home/htdocs/.../config.php" and include my
> I suppose include() can be used to include files from remote
> systems(not on
> WINDOWS).
Only if the sysadmin running your web server allows it, which they should
not.
> A webmaster on the same server can always use a path like
> "/home/htdocs/.../config.php" and include my config .php which
"Other users on the same server *shouldn't* be able to include() in this
way"
How?
Would their $_SERVER['HTTP_HOST'] not be the same?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
All included scripts inherit the variables of the parent script, so you
could test for numerous server variables like the name of the parent script
(PHP_SELF), or the domain name being used, etc etc. If it's not what you
expected, spit out an error.
something like
$_SERVER['HTTP_HOST'] might
, August 01, 2002 3:38 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] include()
On Thursday 01 August 2002 15:28, Lord Loh. wrote:
> I suppose include() can be used to include files from remote systems(not
on
> WINDOWS).
>
> So, How can I protect my script from unauthorised inclusions ?
>
On Thursday 01 August 2002 15:28, Lord Loh. wrote:
> I suppose include() can be used to include files from remote systems(not on
> WINDOWS).
>
> So, How can I protect my script from unauthorised inclusions ?
>
> A webmaster on the same server can always use a path like
> "/home/htdocs/.../config.p
I suppose include() can be used to include files from remote systems(not on
WINDOWS).
So, How can I protect my script from unauthorised inclusions ?
A webmaster on the same server can always use a path like
"/home/htdocs/.../config.php" and include my config .php which contains my
database passw
On Thursday 25 July 2002 18:41, lallous wrote:
> Hello,
>
> I wonder how much I can include files?
>
> does it matter if the size sum of the source code included are above 1MB ?
Instead of testing the mailing list, why not try the above for yourself?
--
Jason Wong -> Gremlins Associates -> www.
Hello,
I wonder how much I can include files?
does it matter if the size sum of the source code included are above 1MB ?
thanks,
elias
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[snip]
> When i use on an include inside of a table
> cell it dosen't work. Any reason?
Almost certainly there'll be a reason. Browse the page in question in
your web browser and then view the source - see if you've ended up with
your page source as you'd intended. Most of these sorts of pr
I think that you need to call the checkMaster() function AFTER you declare
it, not before. Try moving "checkMaster();" beneath the function
definition.
Mick
On Sun, 21 Jul 2002, Jon Wyatt wrote:
>
> I have some pages which include a number of files.
> In one of the include files I have a fun
I have some pages which include a number of files.
In one of the include files I have a function which I wish to be executed
everytime the include file is loaded.
Therefore I place the function name in the include file at the top.
However, this function uses a session variable to decide whethe
> I am trying to write a program that is very modular in
> nature & one of the
> features I need the user to be able to do is install/uninstall or
> enable/disable the module though the interface.
I have, in the past, stored such information in a database. In projects
that have need of suc
Hi,
I am trying to write a program that is very modular in nature & one of the
features I need the user to be able to do is install/uninstall or
enable/disable the module though the interface.
I have though of 2 ways this could be done, either when the module is
installed it adds additional line
ly require one
of the functions.
-Original Message-
From: Jeff Gannaway [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 27, 2002 10:41 AM
To: [EMAIL PROTECTED]
Subject: [PHP] INCLUDE vs Functions
I'm re-writing a medium-sized commercial site in PHP. There will be
elements that will
I'm re-writing a medium-sized commercial site in PHP. There will be
elements that will on nearly every page. I was considering writing each
element as a program and then using INCLUDE statements wherever I wanted
that element displayed. Now I'm wondering if grouping all those elements
into
> Okay, let's say I want to send a user to a certain webpage...
>
> usually I would use...
>
> include("website.php");
>
> but, if i want to send a user to a website along with a
> variable like...
>
> $temp = "website.php?var=".$var;
> include($temp);
>
> ...this doesn't work.
> but, if i want to send a user to a website along
> with a variable like...
>
> $temp = "website.php?var=".$var;
> include($temp);
>
> ...this doesn't work.
Example:
somefile.php now has access to $var. This is
talked about in the manual too:
http://www.php.net/include
In your cas
use header
ob_start()
$temp = "website.php?var=".$var;
header ("Location: $temp");
Puru
- Original Message -
From: "Phil Schwarzmann" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, June 20, 2002 4:31 PM
Subject: [PHP] include()
Okay, let's say I want to send a user to a certain webpage...
usually I would use...
include("website.php");
but, if i want to send a user to a website along with a variable like...
$temp = "website.php?var=".$var;
include($temp);
...this doesn't work.
any suggestions??
THANKS!!
Be careful not to get confused between a chrooted environment like the
web server or ftp server and php include paths. PHP handles the include
and require parameters either as absolute (eg /inc/filename is an
absolute path from / - it is not relative to the web docroot.) or
relative to the
I've tried a hundred different things -- YOURS WORKED! Thank you very much!
-Doug
- Original Message -
From: "Niklas Lampén" <[EMAIL PROTECTED]>
To: "Php-General" <[EMAIL PROTECTED]>
Sent: Monday, June 17, 2002 10:45 PM
Subject: RE: [PHP] include
> somefile.php
> $apple = 'green';
> $pear = 'yellow';
> ?>
>
> callfile.php
> include 'somefile.php';
> echo "Apples are $apple and Pears are $pear"; \\ which would
> return the
> line with green and yellow in the correct spots.
> ?>
>
> But when I just do
>
> include 'som
7;s what it's supposed to do...it's "including" it...
>
>---John Holmes...
>
>
>
>>-Original Message-
>>From: Tom Ray [mailto:[EMAIL PROTECTED]]
>>Sent: Tuesday, June 11, 2002 9:29 PM
>>To: [EMAIL PROTECTED]
>>Subject: [PHP] Include
601 - 700 of 977 matches
Mail list logo