473,326 Members | 2,196 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

$_SERVER[PHP_self]

can someone explain me with an easy example what the function for?

I've read on the php.net, but didn;t really catch the point. I'm a
newbie.

Thanks

Jun 6 '07 #1
4 2783
vinnie wrote:
can someone explain me with an easy example what the function for?

I've read on the php.net, but didn;t really catch the point. I'm a
newbie.

Thanks

Personally i never use $_SERVER['PHP_SELF'] (mind the spellling). I
really cant image when I would ever use it but I guess it could be handy
for stuff like this:
// refresh page
header("Location: ".$_SERVER['PHP_SELF']);

//forms
echo '<form action="'.$_SERVER['PHP_SELF'].'"'>;

I presonally prefer to have a navigation class handle the current
location :-)

Arjen

--
www.arjenkarel.nl

Jun 6 '07 #2
Message-ID: <11*********************@x35g2000prf.googlegroups. comfrom
vinnie contained the following:
>can someone explain me with an easy example what the function for?
Paste this into a few files.
<?php
echo $_SERVER['PHP_SELF'];
?>

They can be named whatever you want, but must have a .php extension.

Upload files to server. Browse for files using browser of your choice.

Any clues yet?
--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/
Jun 6 '07 #3
can someone explain me with an easy example what the function for?
>
Paste this into a few files.

<?php
echo $_SERVER['PHP_SELF'];
?>

They can be named whatever you want, but must have a .php extension.

Upload files to server. Browse for files using browser of your choice.

Any clues yet?
--
I did, and i got the name of the file: but what's for? Why should i
use this function? I mean, what would be use for?

Jun 6 '07 #4
Message-ID: <11*********************@i13g2000prf.googlegroups. comfrom
vinnie contained the following:
>I did, and i got the name of the file: but what's for? Why should i
use this function? I mean, what would be use for?
Anywhere you need to use the name of the file, a form action for
instance. You may design code to go into a file but you might not
necessarily know the name of the file.

--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/
Jun 6 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Salve Håkedal | last post by:
When I select Februar here and sends, selection returns to Januar. I know why: no option is marked selected... But can php get this right in an easy way? <html><head><title>Part of a bigger...
13
by: deko | last post by:
I'm trying to identify which named anchor is currently being viewed on a page. Although the address bar of my browser shows #whatever appended to the end of the url, I can't seem to find it in a...
3
by: Joshua Beall | last post by:
Hi All, What is the difference between $_SERVER and $_SERVER, and which is better to use? According to the CGI 1.1 spec (http://hoohoo.ncsa.uiuc.edu/cgi/env.html), SCRIPT_NAME is not...
10
by: tHatDudeUK | last post by:
My form action code to submit values to itself have stopped working using the code form action = <?=$_SERVER?> This code used to work My web host recently told me they enabled phpsuexec...
1
by: Michael Brennan-White | last post by:
If I submit my for using a get action the resulting page loads . If I use a post action I get an error page saying "The page cannot be found". I am calling the originating page!!! This happens...
10
by: Jim Carlock | last post by:
Looking for a way to extract the path from the pfqpn (partially full qualified path name). $sThisServer = $_SERVER; // returns either aquaticcreationsnc.com or www.aquaticcreationsnc.com ...
7
by: Dynamo | last post by:
I am using values stored an $_POST array to display records from a table before asking the user if he is sure he wants to delete them. If the user confirms then the records are deleted. Without...
5
by: Tom | last post by:
I have a function that restricts access to a page to logged in users. When a user who isn't logged in goes to the page, it will dynamically generate a login form. I'm trying to use it in...
4
by: Jim Carlock | last post by:
Are the XSS / Cross Site Scripting attacks fixed in Version 4.44? I'm seeing that $_SERVER doesn't return the $_SERVER appended to it. I was just messing with a few things and noticed that...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.