* Richard Davey <[EMAIL PROTECTED]>:
> Hello Ross,
>
> Thursday, July 14, 2005, 11:11:25 AM, you wrote:
>
> R> Just a quick thing that is bugging me. In some of my older
> R> textbooks a form is returned to the same page by using
>
> R> echo $PHP_SELF no just $PHP_SELF
>
> R> is this just used in o
Hello Ross,
Thursday, July 14, 2005, 11:11:25 AM, you wrote:
R> Just a quick thing that is bugging me. In some of my older
R> textbooks a form is returned to the same page by using
R> echo $PHP_SELF no just $PHP_SELF
R> is this just used in older versions of php?? Does the it make a
R> differen
Hi PHPers,
Just a quick thing that is bugging me. In some of my older textbooks a form is
returned to the same page by using
echo $PHP_SELF no just $PHP_SELF
is this just used in older versions of php?? Does the it make a difference what
one is used?
Ta,
Ross
* Thus wrote John Holmes:
> Jordi Canals wrote:
> >I'd like to know the difference by using the $_SERVER['PHP_SELF'] and
> >$_SERVER['SCRIPT_NAME'] variables. After I read the manual, I have not
> >found the difference betwen the two when used in a Web Script. Also,
> >in all tests I've done, I get
Jordi Canals wrote:
I'd like to know the difference by using the $_SERVER['PHP_SELF'] and
$_SERVER['SCRIPT_NAME'] variables. After I read the manual, I have not
found the difference betwen the two when used in a Web Script. Also,
in all tests I've done, I get the same result in both variables.
PHP_
Hi all,
I'd like to know the difference by using the $_SERVER['PHP_SELF'] and
$_SERVER['SCRIPT_NAME'] variables. After I read the manual, I have not
found the difference betwen the two when used in a Web Script. Also,
in all tests I've done, I get the same result in both variables.
Any comment wi
Hi
$thisFileName = $PHP_SELF; works in a file just a few lines after the
program start.
$thisFileName = $PHP_SELF; doesn't work (echo ("Debug: self:
$PHP_SELF"); returns Debug: self: ) if it's within function
getNavigation() in the Navigation object called by another program.
Why?
The Navigatio
Philip J. Newman wrote:
$_SERVER["PHP_SELF"]; returns /c/hosting/newman/hello.php
is there an easy way to get get hello.php?
Didn't we just have this question today?
http://www.php.net/manual/en/function.basename.php
--
By-Tor.com
It's all about the Rush
http://www.by-tor.com
--
PHP General Mai
http://au2.php.net/manual/en/function.basename.php
Martin
> -Original Message-
> From: Philip J. Newman [mailto:[EMAIL PROTECTED]
> Sent: Thursday, 5 February 2004 11:57 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] $PHP_SELF AND INFORMATION.
>
>
> $_SERVER
$_SERVER["PHP_SELF"]; returns /c/hosting/newman/hello.php
is there an easy way to get get hello.php?
---
Philip J. Newman
Master Developer
PhilipNZ.com [NZ] Ltd.
[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
October 20, 2003 7:23 AM
Subject: [PHP] $PHP_SELF
I'm having problems with $PHP_SELF variable. Mostly it works, other
times (about 10% of tries) it's just empty. Is this a known issue with Apache
2? If I use $_SERVER['PHP_SELF'], it always works fine, but still I'd
On Mon, Oct 20, 2003 at 01:23:29PM +0200, Boris Sagadin wrote:
:
: I'm having problems with $PHP_SELF variable. Mostly it works, other
: times (about 10% of tries) it's just empty. Is this a known issue with
: Apache 2? If I use $_SERVER['PHP_SELF'], it always works fine, but
: still I'd like to k
I'm having problems with $PHP_SELF variable. Mostly it works, other
times (about 10% of tries) it's just empty. Is this a known issue with Apache
2? If I use $_SERVER['PHP_SELF'], it always works fine, but still I'd
like to know if this is a common bug or there's something wrong with
my configurat
On Wednesday, October 15, 2003, at 01:12 AM,
[EMAIL PROTECTED] wrote:
I'm using $PHP_SELF, but need to automatically record what variables
are
in the URL at that time...
is that possible?
try to get in the habbit of using $_SERVER['PHP_SELF'] on PHP >= 4.1,
because $PHP_SELF is deprecated.
an
I'm using $PHP_SELF, but need to automatically record what variables are
in the URL at that time...
is that possible?
I've searched PHP.net, but cannot find this specific function...
Cheers,
Tris...
*
The information contained
eb Developer
> Mophus.com, Inc.
>
>
> - Original Message -
> From: "Johnny Martinez" <[EMAIL PROTECTED]>
> To: "php list" <[EMAIL PROTECTED]>
> Sent: Thursday, June 05, 2003 4:36 PM
> Subject: [PHP] $PHP_SELF
>
>
> Hi all,
> I'm trying
CTED]>
Sent: Thursday, June 05, 2003 4:36 PM
Subject: [PHP] $PHP_SELF
Hi all,
I'm trying to get the path and filename of the script I am running.
$PHP_SELF doesn't seem to work. I'm running PHP4 on a Windows 2000 system.
Thanks in advance.
Johnny
--
PHP General Mailing List (
Hi all,
I'm trying to get the path and filename of the script I am running.
$PHP_SELF doesn't seem to work. I'm running PHP4 on a Windows 2000 system.
Thanks in advance.
Johnny
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Thanks Chris for your thoughts, but no success yet.
Details interspersed below
Chris Hayes wrote:
> ...and the problem that the form immediately goes to the real url is that
> people see the real url?
No, the problem is that the URLs don't match. The browser does accurately find
the page, etc.
...and the problem that the form immediately goes to the real url is that
people see the real url?
What about one of the following:
- chop off the subdir again by only putting the last part of $PHP_SELF as
form action (f.i. with a combination of substr($PHP_SELF,...,...) and
strpos('/') )
or
If I use $PHP_SELF as the action in a form where the domain name is redirected,
I get the extra directory.
Is there a way around that?
Details:
The domain name is redirected in .htaccess like this:
RewriteCond %{REQUEST_URI} !domain2
RewriteRule ^(.*) %1/$1 [L
on 24/02/03 11:42 AM, Jason Lange ([EMAIL PROTECTED]) wrote:
> What you might try is removing the single-quotes from around PHP_SELF.
>
> Before: $_SERVER['PHP_SELF']
> After: $_SERVER[PHP_SELF]
>
> Another note: as far as I can tell you do not need the braces ({}) to
> enclose a variable withi
At 01:42 24.02.2003, Jason Lange spoke out and said:
[snip]
>What you might try is removing the single-quotes from around PHP_SELF.
>
>Before: $_SERVER['PHP_SELF']
>After: $_SERVER[PHP_SELF]
This is only valid if the array is contained within a double quote
> What you might try is removing the single-quotes from around PHP_SELF.
>
> Before: $_SERVER['PHP_SELF']
> After: $_SERVER[PHP_SELF]
>
> Another note: as far as I can tell you do not need the braces ({}) to
> enclose a variable within a double-quoted string. I may be wrong, but
> nothing I've rea
What you might try is removing the single-quotes from around PHP_SELF.
Before: $_SERVER['PHP_SELF']
After: $_SERVER[PHP_SELF]
Another note: as far as I can tell you do not need the braces ({}) to
enclose a variable within a double-quoted string. I may be wrong, but
nothing I've read advocates d
On Sun, 23 Feb 2003 18:55:06 -0500, you wrote:
>Could someone tell me why this code prompts a parse error. I have tried it
>several different way. The statement is called from within a function:
>
>print "action=\"$_SERVER['PHP_SELF']\">\n";
echo ('' . "\n");
works for me (moved the variable out
At 00:55 24.02.2003, Peter Gumbrell said:
[snip]
>Could someone tell me why this code prompts a parse error. I have tried it
>several different way. The statement is called from within a function:
>
>print "action=\"$_SERVER['PHP_SELF']\">\n";
---
Could someone tell me why this code prompts a parse error. I have tried it
several different way. The statement is called from within a function:
print "\n";
Many thanks
Peter
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hello Leif, hello all,
i compiled successfully php-4.3-dev deom tarball as CGI on RedHat7.3
register_globals is on
And here is how my php behave:
When I run the following script: info70.php
1) from commandline
then [SCRIPT_NAME] => info70.php
is set correctly
2) direkt via http request from
Hello Leif, hello all,
register_globals is on
How can I use the superglobal array?
And here is how my php behave:
when I run the following script: info70.php
1) from commandline
then [SCRIPT_NAME] => info70.php
is set correctly
2) direkt via http request from browser
then PHP_SELF = htdocs3/b
nip
How can I get this value when I run it as a CGI?
Oliver Etzel
- Original Message -
From: Leif K-Brooks
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Tuesday, December 10, 2002 1:03 PM
Subject: Re: [PHP] PHP_SELF Variable
Odd. Mind doing: print_r($GLOBALS); and t
EMAIL PROTECTED]
Sent: Tuesday, December 10, 2002 1:03 PM
Subject: Re: [PHP] PHP_SELF Variable
Odd. Mind doing: print_r($GLOBALS); and tsending the results?
[EMAIL PROTECTED] wrote:
>Hello Johannes, hello all,
>
>I compiled it as CGI-php
>and the variable $_SERVER['PHP
Odd. Mind doing: print_r($GLOBALS); and tsending the results?
[EMAIL PROTECTED] wrote:
Hello Johannes, hello all,
I compiled it as CGI-php
and the variable $_SERVER['PHP_SELF'] has no value either.
What can I do on order to give PHP_SELF the right value?
Oliver Etzel
On Tuesday 10 Decembe
Hello Johannes, hello all,
I compiled it as CGI-php
and the variable $_SERVER['PHP_SELF'] has no value either.
What can I do on order to give PHP_SELF the right value?
Oliver Etzel
On Tuesday 10 December 2002 12:36, info AT t-host.com wrote:
> after successfully compiling and installing ph
On Tuesday 10 December 2002 12:36, info AT t-host.com wrote:
> after successfully compiling and installing php.4.3-dev from tarball
> ...
> PHP_SELF has no value. How can I set this?
Try using $_SERVER['PHP_SELF'] if it works look at the release notes and look
for "register_globals"
johannes
--
Hello Leif, hello all,
after successfully compiling and installing php.4.3-dev from tarball
there in my info.php the variable
Variable Value
PHP_SELF
PHP_SELF has no value. How can I set this?
Oliver Etzel
Not quite sure what you mean, but I'm guessing you're trying to use
$PHP_SELF and it's not set. If that's the case, use
$_SERVER['PHP_SELF'] instead. Register_globals defaults to disabled now.
[EMAIL PROTECTED] wrote:
Hello List,
anybody knows how to set the PHP_SELF variable?
Short answers
Hello List,
anybody knows how to set the PHP_SELF variable?
Short answers are welcome...
Oliver Etzel
I have two url containing the same php web pages
http://ngvabook/
and
http://dev/ngvabook
ngvabook is the live pages
dev/ngvabook is the test.
both are checked out of CVS and thus the same source
using the dev/ngvabook $PHP_SELF is set to http://dev/ngvabook
when using the http://ngvabook vers
On Sunday 21 April 2002 00:51, Ben Edwards wrote:
> The variable $PHP_SELF seems to be blank, I am using PHP 4.1.2 and Xitami
> 2.4d9 which are both the latest version. Has anyone else had this problem
> and do they know how to fix it?
use:
print_r($GLOBALS)
to verify.
--
Jason Wong -> Gre
The variable $PHP_SELF seems to be blank, I am using PHP 4.1.2 and Xitami
2.4d9 which are both the latest version. Has anyone else had this problem
and do they know how to fix it?
Ben
* Ben Edwards +
Spend a bit of time reading up on predefined variables (like $PHP_SELF) in
the manual:
http://www.php.net/manual/fi/reserved.variables.php
I believe you're after SCRIPT_NAME, but it's worth familiarising yourself
with them all for future reference.
Justin French
Creative D
I've got an include file that provides the basic framework for every page on
my site, and at the bottom of each page, I want to spit out when the page
was last updated. I used $PHP_SELF inside the include file, and got the
include file's path. Is there a variable equivalent to $PHP_SELF that
ret
Hi guys!
$php_self and $php_referrer doesnt work the same in IE and Netscape
When opening a page with
IE they return for example http://localhost/directroy/index.php
but in Netscape Navigator - http://localhost/directory/
Why?
And how to solve this problem?
Thanks
--
PHP General Mailing L
Try "mailto:[EMAIL PROTECTED]]
Sent: Monday, April 01, 2002 6:24 PM
To: [EMAIL PROTECTED]
Subject: [PHP] $PHP_SELF
SysInfo: Apache/1.3.24 (Win32) PHP/4.1.3-dev
I have a question that could be Apache, could be php, but I'm so new to this
I have to ask: what is wrong with my code fo
SysInfo: Apache/1.3.24 (Win32) PHP/4.1.3-dev
I have a question that could be Apache, could be php, but I'm so new to this I have to
ask: what is wrong with my code for the form action? Apache does not recognize the " METHOD=POST>
SSN:
First Name:
Last Name:
Employer:
Hello:
> echo __FILE__;
> will show the current file name
Oops! Thanks! ;-))
Regards.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Wednesday 20 March 2002 10:12, José León Serna wrote:
> Hello:
> > try it with __FILE__
> > you might have to work a little on the resulting string, but it at least
> > delivers the current file's name
>
> What is __FILE__, a global var, an environment variable? Could you put a
> simple example
Hello:
> try it with __FILE__
> you might have to work a little on the resulting string, but it at least
> delivers the current file's name
What is __FILE__, a global var, an environment variable? Could you put a
simple example?
Regards and thanks for your quick answer.
--
PHP General Mailing
Hello:
I would like to do the following:
a.php
--
include "b.php";
b.php
--
echo $PHP_SELF;
in b.php, instead show a.php as the script is executing, I want to know if
there's a way to show b.php, that is, the included file is being executed.
Regards.
--
PHP General Ma
On Tue, 2002-03-12 at 15:17, David Johansen wrote:
> Here's the chunk of code in the include file that gave me that. I should
> have put it with the original post:
Ach. Well, $PHP_SELF is in the global scope, so you will either need to
use 'global $PHP_SELF;' at the beginning of your function, o
On Tue, 12 Mar 2002, David Johansen wrote:
you might try
global $PHP_SELF;
in that function...
> Here's the chunk of code in the include file that gave me that. I should
> have put it with the original post:
>
> function questions()
> {
> ?>
> U face="Times New Roman" size="2">
>
>
> function questions()
> {
[snip]
> }
> ?>
$PHP_SELF is unknown to the function "questions()".
You'll need to add "global $PHP_SELF" at the top of the function.
Jason
--
Jason Murray
[EMAIL PROTECTED]
Web Developer, Melbourne IT
"Work now, freak later!"
--
PHP General Mailing List (ht
On Tue, 2002-03-12 at 15:13, David Johansen wrote:
> I'm doing exactly what you said and here's what it says when I call
> $PHP_SELF in the include file:
>
> http://12.254.227.149/Warning:%20%20Undefined%20variable:%20%20PH
> P_SELF%20in%20c:/inetpub/wwwroot/pages.inc%20on%20line%2035 >?page=ques
Here's the chunk of code in the include file that gave me that. I should
have put it with the original post:
U
Questions
Insert questions here.
Thanks,
Dave
"Lars Torben Wilson" <[EMAIL PROTECTED]> wrote in message
1015974570.2134.94.camel@ali">news:1015974570.2134.94.camel@al
I'm doing exactly what you said and here's what it says when I call
$PHP_SELF in the include file:
http://12.254.227.149/Warning:%20%20Undefined%20variable:%20%20PH
P_SELF%20in%20c:/inetpub/wwwroot/pages.inc%20on%20line%2035?page=questions
"Lars Torben Wilson" <[EMAIL PROTECTED]> wrote in messa
On Tue, 2002-03-12 at 15:02, David Johansen wrote:
> Is there a way that I can use $PHP_SELF in include files, so that the
> function will use the URL of the php script that calls the include file?
> Thanks,
> Dave
If a.php includes b.php, and you check $PHP_SELF in b.php, it should
give you the
Is there a way that I can use $PHP_SELF in include files, so that the
function will use the URL of the php script that calls the include file?
Thanks,
Dave
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Tue, 2002-02-19 at 05:14, Ford, Mike [LSS] wrote:
> > -Original Message-
> > From: Matt [mailto:[EMAIL PROTECTED]]
> > Sent: 18 February 2002 23:30
> > To: Lars Torben Wilson
> >
> > > $foo = "This page is $_SERVER[PHP_SELF]";
[snip]
> > Can you expand on why the first option isn't
> -Original Message-
> From: Matt [mailto:[EMAIL PROTECTED]]
> Sent: 18 February 2002 23:30
> To: Lars Torben Wilson
>
> > $foo = "This page is $_SERVER[PHP_SELF]";
> >
> > Or, better:
> >
> > $foo = "This page is {$_SERVER['PHP_SELF']}";
> >
> > You do have to concat to do this in si
On Tue, 19 Feb 2002 09:50, Narvaez, Teresa did align ASCII characters thusly:
> When I execute the code below, why is PHP_SELF undefined? I will appretiate
> any help on this. I can get its value by:
> echo $_SERVER["PHP_SELF"];Thanks in advance! -Teresa
>
>
>
>
> Feedback
>
>
> $for
PROTECTED]
Subject: Re: [PHP] PHP_SELF Undefined
> When I execute the code below, why is PHP_SELF undefined? I will
appretiate
> any help on this. I can get its value by:
> echo $_SERVER["PHP_SELF"];Thanks in advance! -Teresa
Is your PHP install >= version 4.1.0 ?
Yo
> When I execute the code below, why is PHP_SELF undefined? I will
appretiate
> any help on this. I can get its value by:
> echo $_SERVER["PHP_SELF"];Thanks in advance! -Teresa
Is your PHP install >= version 4.1.0 ?
You can test with a call to phpinfo();
If your version is less than 4.
> The other reason is that the parser needs help resolving ambiguity with
> more complex expressions inside strings. If you use this syntax all the
> time, you won't get bitten in the butt later.
I've used the ${$var} to resolve the ambiguity of variable variables, but I
wasn't aware that if coul
On Monday, February 18, 2002, at 06:14 PM, Lars Torben Wilson wrote:
> Sorry, but I do have to correct you here--this isn't true. ;) In double-
> quoted strings and heredocs, you can do the following:
>
> $foo = "This page is $_SERVER[PHP_SELF]";
>
> Or, better:
>
> $foo = "This page is {$_
On Mon, 2002-02-18 at 15:29, Matt wrote:
> > $foo = "This page is $_SERVER[PHP_SELF]";
> >
> > Or, better:
> >
> > $foo = "This page is {$_SERVER['PHP_SELF']}";
> >
> > You do have to concat to do this in single-quoted (noninterpolated)
> > strings, though.
> >
> >
> http://www.php.net/manual/
> $foo = "This page is $_SERVER[PHP_SELF]";
>
> Or, better:
>
> $foo = "This page is {$_SERVER['PHP_SELF']}";
>
> You do have to concat to do this in single-quoted (noninterpolated)
> strings, though.
>
>
http://www.php.net/manual/en/language.types.string.php#language.types.string
.parsing
Ca
PHP just to echo your variable.
Example:
Feedback
Your Name:
Your E-Mail Address:
Your Message:
mailto:[EMAIL PROTECTED]]
Sent: Monday, February 18, 2002 3:51 PM
To: [EMAIL PROTECTED]
Subject: [PHP] PHP_SELF Undefined
When I execute the code below, why is
On Mon, 2002-02-18 at 15:02, Erik Price wrote:
>
> On Monday, February 18, 2002, at 05:50 PM, Narvaez, Teresa wrote:
>
> > When I execute the code below, why is PHP_SELF undefined? I will
> > appretiate
> > any help on this. I can get its value by:
> > echo $_SERVER["PHP_SELF"];Thanks
On Monday, February 18, 2002, at 05:50 PM, Narvaez, Teresa wrote:
> When I execute the code below, why is PHP_SELF undefined? I will
> appretiate
> any help on this. I can get its value by:
> echo $_SERVER["PHP_SELF"];Thanks in advance! -Teresa
>
>
>
>
> Feedback
>
>
> $form_block
When I execute the code below, why is PHP_SELF undefined? I will appretiate
any help on this. I can get its value by:
echo $_SERVER["PHP_SELF"];Thanks in advance! -Teresa
Feedback
Your Name:
Your E-Mail Address:
Your Message:
";
?>
Is the code below in a function? If so, you'll have to globalize $PHP_SELF:
function your_function() {
global $PHP_SELF;
...
echo $PHP_SELF;
..
}
alternatively, you could do
function your_function() {
Hi there,
I have created a script that is suppose to get some input from
user and display back, and i have the following method
so i have a script that if login fails it will ask the user
to register,
if(!$username) {
session_unregister("userid");
session_uregister("userpassword");
ech
Does $PHP_SELF always get's the path of the document it resides in even if the
document is an include?
I'm trying to set one of those breadcrumb path navigation scripts and I don't want to
copy the
script to every directory, I just want to include it in my header.inc.
As a result I only get th
On Mon, 3 Sep 2001 17:15:25 -0700, you wrote:
>So, with the PHP_self (in my hangman game) I probably can send the value of
>my variable to the same page. now my next question is:
>
>How do i maintain the content of the page which is build based on the value
>passed from the previous submision? Do
Hi again!
Thank you for those who have reply my email.
Actually I'm trying to make a hangman game for my students.
I have seen one game written using PHP_SELF but I can't understand who it
works.
So, with the PHP_self (in my hangman game) I probably can send the value of
my variable to the sam
> my next question is: how does it work when I use PHP_SELF to
> send a value of a variable to the same page?
You use it to point your there.
Now, if the file this form is in gets renamed from foo.php
to bar.php, the form won't break.
Jason
--
Jason Murray
[EMAIL PROTECTED]
Web Develop
Thanks for your quick reply.
my next question is: how does it work when I use PHP_SELF to send a value of
a variable to the same page?
Thanks!
Ardani
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
On Tue, 4 Sep 2001 08:58, Ardani Sarjito wrote:
> hi!
>
> I have tried to undersatand the usage of PHP_SELF but I still don't get
> it. Could anybody please explain it in simple palin English to this
> poor slow guy who has just learn PHP?
>
> Thank you so much for reviewing this email.
>
> I'm j
hi!
I have tried to undersatand the usage of PHP_SELF but I still don't get it.
Could anybody please explain it in simple palin English to this poor slow
guy who has just learn PHP?
Thank you so much for reviewing this email.
I'm just tring to make a game which require this function but luck is
So sprach »Arcadius A.« am 2001-08-31 um 17:36:51 -0700 :
> Would this work ?
Kinda, but not really.
If you want to do this, you've got to stuff it all in one function, like
so:
function dunno($mandatory, $optional1 = NULL, $opt2 = NULL){
if (NULL === $optional1){
// be
Ok .I see Thanks to you both !
Have a nice weekend
Arcad
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
> One of the downside of PHP IMHO is, that you do not have to define
> variables. This leads to a lot of errors. At least there should be a
> "option", which forces you to define variables, like maybe so:
I've not followed this thread but this is pretty much what E_NOTICE is
for, turn it on in
> Cool ...
> Now that we're talking about PHP
> I'd like to ask a question
> You know the "overloading" function in C++ Is that
> possible in PHP ?
No, I do not believe so.
> Basically , I'd like to define more than one function having
> the same name but different number of v
c: "Arcadius A." <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Friday, August 31, 2001 8:21 AM
Subject: Re: [PHP] PHP_SELF or REQUEST_URI within Function ?
> So sprach »Boget, Chris« am 2001-08-31 um 10:22:28 -0500 :
> > True. But take the following function:
> >
> One of the downside of PHP IMHO is, that you do not have to define
> variables. This leads to a lot of errors. At least there should be a
> "option", which forces you to define variables, like maybe so:
> dim $some_var;
I definitely agree there. I've been bitten by this bug more times
So sprach »Boget, Chris« am 2001-08-31 um 10:22:28 -0500 :
> True. But take the following function:
>
> function processLotsOfFormVars() {
> global $fieldOne, $fieldTwo, $fieldThree, $fieldFour;
> global $fieldFive, $fieldSix, $fieldSeven;
> global $PHP_SELF, $REQUEST_URI;
> global $HTTP
RE: [PHP] PHP_SELF or REQUEST_URI within Function ?Ok Men !!!. Now I see
thanks alot for the inputs ! :o))
Arcad
- Original Message -
From: Boget, Chris
To: 'Alexander Skwar'
Cc: Arcadius A. ; [EMAIL PROTECTED]
Sent: Friday, August 31, 2001 8:22 AM
S
> > Or, so you don't have to specify all the variables you are using
> > as globals (especially if you are using *alot* of them), you can
> > use:
> > $GLOBALS[SCRIPT_FILENAME];
> What's the gain? 'global ' has 7 characters, whereas '$GLOBALS[]' has
> 10 characters. So, you don't type less. A
So sprach »Boget, Chris« am 2001-08-31 um 10:04:49 -0500 :
> Or, so you don't have to specify all the variables you are using
> as globals (especially if you are using *alot* of them), you can
> use:
>
> $GLOBALS[SCRIPT_FILENAME];
What's the gain? 'global ' has 7 characters, whereas '$GLOBALS
> So sprach »Arcadius A.« am 2001-08-31 um 05:27:04 -0700 :
> > $u = $SCRIPT_FILENAME;
> Because you did not define $SCRIPT_FILENAME anywhere. If you want to
> access the global variable, you've got to say so:
> global $SCRIPT_FILENAME;
Or, so you don't have to specify all the variables you are
So sprach »Arcadius A.« am 2001-08-31 um 05:27:04 -0700 :
> $u = $SCRIPT_FILENAME;
Because you did not define $SCRIPT_FILENAME anywhere. If you want to
access the global variable, you've got to say so:
global $SCRIPT_FILENAME;
Alexander Skwar
--
How to quote: http://learn.to/quote (german)
Thanks Jack
arcad.
"Jack Dempsey" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> you have to use $GLOBALS["SCRIPT_FILENAME"]
>
> jack
>
> "Arcadius A." wrote:
>
> > Hello !
> > Why this script prints an empty string(it prints nothing) as the
value of
> function menu( $theurl)
> {
> //global $u ;
> $u = $SCRIPT_FILENAME;
> echo $u;
> echo $theurl;
> }
> ?>
>
> Hello there !!!
>
>
Variable scope.
You need a "global $SCRIPT_FILENAME;" at the top of the function.
Jason
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-ma
you have to use $GLOBALS["SCRIPT_FILENAME"]
jack
"Arcadius A." wrote:
> Hello !
> Why this script prints an empty string(it prints nothing) as the value of
> the variable "u" ?
> This happens even if $REQUEST_URI or PHP_SELF is used instead of
> SCRIPT_FILENAME .
> Thanks...
>
> function m
Hello !
Why this script prints an empty string(it prints nothing) as the value of
the variable "u" ?
This happens even if $REQUEST_URI or PHP_SELF is used instead of
SCRIPT_FILENAME .
Thanks...
Hello there !!!
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail:
Michael,
I've got a program set up like you describe.
the problem is I've noticed that my variables are NOT stable
this is it in a nutshell
1) show 3 options with radio buttons for each
2) based on above query a database and show a list of the records
(now it just dawned on my that I've been
Tried this and got parsing errors so " must be correct.
"Richard Baskett" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Does the manual actually say to use the tags ""? Or is it the
> normal tags of ""?
>
> > I run a small search engine and adding URL's is
What I've said.
I might just check out trying out as they aren't the brightest
bunch of individuals.
- Original Message -
From: "Richard Baskett" <[EMAIL PROTECTED]>
To: "Phil Latio" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: M
Does the manual actually say to use the tags ""? Or is it the
normal tags of ""?
> I run a small search engine and adding URL's is a bit of a pain so I thought
> I would try to make it easier. Looking around I found a PHP function called
> "get_meta_tags" which unsurprisingly, grabs the contents
1 - 100 of 149 matches
Mail list logo