[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: SV: [PROGRAMMERING] <form action="<?php echo $PHP_SELF?>" method="POST">



Jørgen Heesche wrote:
Lars Riisgaard Ribe wrote:
om PHP_SELF. Det undrer mig faktisk, at Jørgen ikke får fejl, når han
skriver det med apostrof.

Det er lidt ejendommeligt.
Se f.eks:
<?php print("A. SERVER PHP_SELF => " . $_SERVER['PHP_SELF'] . "<br>");?>
<?php print("A2. SERVER PHP_SELF => " . $_SERVER[PHP_SELF] . "<br>");?>
<?php print("B. SERVER PHP_SELF => {$_SERVER['PHP_SELF']}<br>");?>
<?php print("B2. SERVER PHP_SELF => {$_SERVER[PHP_SELF]}<br>");?>
<?php print("C. SERVER PHP_SELF = $_SERVER['PHP_SELF']<br>");?>
<?php print("C2. SERVER PHP_SELF = $_SERVER[PHP_SELF]<br>");?>

Både A, A2, B, B2 og C2 viser værdien af PHP_SELF, men C er blank.

Og det er næsten som det skal være. Den eneste ejendommelighed er, som Lars også nævnte, at du burde have fået en fejlmeddelelse for C.


De præcise regler kan ses på
http://dk.php.net/manual/en/language.types.string.php#language.types.string.parsing

Brugen af apostrof svarer sikkert til brugen af apostrof ved filnavne.

Nej. De to har noget nær intet med hinanden at gøre.


Med venlig hilsen

Ole

 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-11-01, 02:01 CET [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *