Try using apache var $SERVER_SOFTWARE in order to know where you are ----- Original Message ----- From: "John A. Grant" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, October 26, 2001 5:18 PM Subject: [PHP] how to recognize local or server execution?
> I have an xxx.php page that runs on my Unix server. I also > run php.exe on my NT box to generate the corresponding > xxx.html file like this: > c:\> php -q xxx.php > xxx.html > > The xxx.php file contains stuff like this: > print "hello\n"; > > That means stdout from the server and the xxx.html file > both contain \n. I would like the xxx.html file to contain > \r\n so it can be viewed/edited with notepad. Yes, > notepad and \r\n both suck, but that's another story... > > So I guess I would like my code to look like this: > if(running php.exe on my NT box){ > $delimiter="\r\n"; > }else{ > $delimiter="\n"; > } > > and then my code looks like: > print "hello$delimiter"; > > How can I do this? > > -- > John A. Grant * I speak only for myself * (remove 'z' to reply) > Radiation Geophysics, Geological Survey of Canada, Ottawa > If you followup, please do NOT e-mail me a copy: I will read it here > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]