in one scipt i got this code but i dont now what it means
this is a script :
$link = $PHP_SELF."?item_type_id=$row[item_type_id]&item_id=$row[item_id]";
$edit_link = $PHP_SELF."?file_id=5&item_id=$row[item_id]&task=edit";
break;
specially I dont now what this sign (?)mean in thet script.........
can anyone...
Moderator: General Moderators
-
malcolmboston
- DevNet Resident
- Posts: 1826
- Joined: Tue Nov 18, 2003 1:09 pm
- Location: Middlesbrough, UK
PHP_Self
Description
The filename of the currently executing script, relative to the document root.
NOTE
$PHP_SELF should not be used because it will not work without register_globals being enabled. Rather, you should use $_SERVER['PHP_SELF'] for it.
found an explanation here http://www.phpfreaks.com/phpref/34.php
also without meaning to sound detrimental you can find all syntax with descriptions of use and meaning in the PHP manual here
http://www.php.net/manual/en/
but good look, ive done the same seemingly not been able to find something so just go on here, but honestly these guys say read the manual for a good reason
Good Luck mate
Description
The filename of the currently executing script, relative to the document root.
NOTE
$PHP_SELF should not be used because it will not work without register_globals being enabled. Rather, you should use $_SERVER['PHP_SELF'] for it.
found an explanation here http://www.phpfreaks.com/phpref/34.php
also without meaning to sound detrimental you can find all syntax with descriptions of use and meaning in the PHP manual here
http://www.php.net/manual/en/
but good look, ive done the same seemingly not been able to find something so just go on here, but honestly these guys say read the manual for a good reason
Good Luck mate
Here is an example. Lets say the script holding the code mentioned in the first post was located @ http://www.example.com/items/index.php
Here is what those links would output:
Here is what those links would output:
Code: Select all
<?php
$link = $PHP_SELF."?item_type_id=$row[item_type_id]&item_id=$row[item_id]";
echo $link; // would output a variation of: example.com/items/index.php?item_type_id=55&item_id=397
$edit_link = $PHP_SELF."?file_id=5&item_id=$row[item_id]&task=edit";
echo $edit_link; // would output a variation of: example.com/items/index.php?file_id=5&item_id=397&task=edit;
?>