![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 1 707 Pomógł: 266 Dołączył: 3.07.2012 Skąd: Poznań Ostrzeżenie: (0%) ![]() ![]() |
Stosunkowo często używam Content-Type: text/plain, głównie dla moich własnych narzędzi. Tak się zastanawiam - czy jest jakiś standard jaki powinien być znak nowej linii dla zwykłego tekstu wysyłanego do przeglądarki? Jak jeszcze byłem lamusem, używałem do tego celu PHP_EOL, co jest absolutną bzdurą, bo przecież odpowiedź do przeglądarki nie ma nic wspólnego z systemem używanym na serwerze. Teraz używam \n, ale być może jakieś standardy zalecają \r\n?
Oczywiście działa jedno i drugie. Pytam jako pedant. (IMG:style_emoticons/default/smile.gif) |
|
|
![]() |
![]()
Post
#2
|
|
Grupa: Zarejestrowani Postów: 460 Pomógł: 49 Dołączył: 5.06.2011 Ostrzeżenie: (0%) ![]() ![]() |
https://en.wikipedia.org/wiki/MIME
HTTP go używa. Cytat Although MIME was designed mainly for SMTP, the content types defined by MIME standards are also of importance in communication protocols outside email, such as HTTP for the World Wide Web. Servers insert the MIME header at the beginning of any Web transmission. Clients use this content type or media type header to select an appropriate viewer application for the type of data the header indicates. Some of these viewers are built into the Web client or browser (for example, almost all browsers come with GIF and JPEG image viewers as well as the ability to handle HTML files).
|
|
|
![]() ![]() |
![]() |
Aktualny czas: 12.10.2025 - 22:15 |