Re: Form Post to different domain
| From: | Daniel Brown | Date: | Thu, 16 Feb 2012 15:09:37 +0000 |
| Subject: | Re: Form Post to different domain | ||
| References: | 1 2 3 4 5 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-316617@lists.php.net to get a copy of this message | ||
On Thu, Feb 16, 2012 at 09:53, Tedd Sperling <tedd.sperling@gmail.com> wrote:
>
> Why the '.PHP_EOL' ?
>
> I've never seen that before and looking through the PHP documentation doesn't give me
> much.
Cross-compatibility. For systems which use \n, PHP_EOL will be
\n. For systems which use \r\n, PHP_EOL will be \r\n. And, for
oddball or legacy systems which still use \r.... you get the point.
This means you can rest assured that the newlines will be
appropriate for the system on which PHP is running. While it makes
little difference on the web, it makes a world of difference at the
CLI and when writing to plain-text files (including CSV). I've been
using it out of the force of habit for about seven years or so, and
exclusively (with the exception of email headers and other warranted
cases) for the last four.
There are a lot of other very useful and yet very underused
constants. You can find the info on them here:
http://php.net/reserved.constants
--
</Daniel P. Brown>
Network Infrastructure Manager
http://www.php.net/