![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 9 Pomógł: 0 Dołączył: 12.05.2007 Ostrzeżenie: (0%) ![]() ![]() |
Witam,
Udało mi się właśnie zainstalować Apache2.0.59 i PHP 5.2 na moim komputerze. PHP wydaje się, że działa ale kiedy startuję dokument o poniżej podanej treści:
jako wynik Firefox i IE6.0 wyświetlają co następuje string1string2. Z dokumentacji PHP wynika, że Komenda "Echo "string2"" powinna wypisać teskst w nowej linijce. Przykłady wzięte z tutorialu też raczej nieprawidłowo są wyświetlane. Następująca modyfikacja nie zmieniła formatu wyświetlania:
Jak sobie z tym poradzić Rafal Z |
|
|
![]() |
![]()
Post
#2
|
|
Grupa: Zarejestrowani Postów: 9 Pomógł: 0 Dołączył: 12.05.2007 Ostrzeżenie: (0%) ![]() ![]() |
W takim razie jak rozumieć następujący wpis w dokumentacji
Cytat If the string is enclosed in double-quotes ("), PHP understands more escape sequences for special characters: cytat: PHP Manual->Types->Strings
Table 11.1. Escaped characters sequence meaning \n linefeed (LF or 0x0A (10) in ASCII) \r carriage return (CR or 0x0D (13) in ASCII) \t horizontal tab (HT or 0x09 (9) in ASCII) \\ backslash \$ dollar sign \" double-quote \[0-7]{1,3} the sequence of characters matching the regular expression is a character in octal notation \x[0-9A-Fa-f]{1,2} the sequence of characters matching the regular expression is a character in hexadecimal notation Again, if you try to escape any other character, the backslash will be printed too! Before PHP 5.1.1, backslash in \{$var} hasn't been printed. But the most important feature of double-quoted strings is the fact that variable names will be expanded. See string parsing for details. |
|
|
![]() ![]() |
![]() |
Aktualny czas: 5.10.2025 - 11:44 |