[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]![]() |
![]() |
![]() |
|||||||||||||||||||||||||
|
|||||||||||||||||||||||||||
![]() |
![]() |
![]() |
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.
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.
![]() |
![]() |
![]() |
||||||||||||
|
||||||||||||||
![]() | ||||||||||||||
|
||||||||||||||
![]() |
![]() |
![]() |