Re: Windows/UNIX differences?
| From: | jimw at apache dot org | Date: | Fri, 02 Nov 2001 21:38:05 +0000 |
| Subject: | Re: Windows/UNIX differences? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-73302@lists.php.net to get a copy of this message | ||
Ben Edwards <ben@videonetwork.org> wrote:
> Have a regular expression which replaces ' with '' (used to insert ' into
> db):
> preg_replace("/\'/", "''", $text );
> This works great on the UNIX production machine but not on windows
> development environment. Actually replaces ' with \'' not ''.
>
> Before I write a function that loops thought the whole thing looking at
> each character and replaces ' with '' has anybody got any ideas?
rather than preg_replace behaving differently on windows and unix, it
seems more likely that your windows install of php has
'magic_quotes_gpc' set on in php.ini, and the unix install has it set to
off.
jim