Re: Pre global configuration

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



It seems the best way to do this would be a predefined constant.  You'd just 
need to update the constant whenever you move to a new Operating System. 
Then, just always append the constant to your strings:

//change for linux or windows
define('CRNL',"\r\n);
//define('CRNL',"\n);

print "foobar".CRNL;


-- 

Sincerely,

A.J. Brown



"Jake Gardner" <gardner.jake@xxxxxxxxx> wrote in message 
news:d8a4abc10509270740d95d6c@xxxxxxxxxxxxxxxxx
This is a stretch and I doubt you can do this very easily, but I was
wondering if there is a way to define behaviors that happen throughout
a script before execution for example if the OS is windows, all
strings are terminated with \r\n, if Linux, then \n without adding
addition ifs throughout the code. 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux