"PagCal" wrote:
If I want to write client independant code, and generate
new lines for WINDOWS as well as UNIX, how can I tell
from a php scrip what to use?
Should it be ’\n’ or ’\r\n’ or
’\r’ ?
The unix people don’t like the \r’s, but if I leave them
out,
the Windows people can’t read the generated file.
If you are asking about detecting Windows vs. Unix, use this code:
$bWindows = strpos($_ENV[’OS’], "Win") !== false;
so $bWindows will be true if on Windows machine.
--
http://www.dbForumz.com/ This article was posted by author's request
Articles individually checked for conformance to usenet standards
Topic URL:
http://www.dbForumz.com/PHP-newline-...ict135955.html
Visit Topic URL to contact author (reg. req'd). Report abuse:
http://www.dbForumz.com/eform.php?p=454418