note 45824 deleted from function.ereg-replace by tomsommer

From: Date: Wed, 22 Sep 2004 19:31:11 +0000
Subject: note 45824 deleted from function.ereg-replace by tomsommer
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-77191@lists.php.net to get a copy of this message
Note Submitter: swilsont2 at mail dot cl ---- Hi everybody! I've noticed that the function ereg_replace() has a problem when working with getcwd(), at least under WinXP Pro, Apache 2.0 and PHP 4.3.6... for example, trying to change the backslashes for normal slashes by this way: $curr_dir=getcwd(); $progr_dir=ereg_replace('\', "/", $curr_dir); ... doesn't work! $curr_dir=getcwd(); $progr_dir=ereg_replace("\\", "/", $curr_dir); ... this one doesn't work too! $curr_dir=getcwd(); $progr_dir=str_replace('\', "/", $curr_dir); ... not this one, also! This gave me a big headache, but fortunately I got the solution: $curr_dir=getcwd(); $progr_dir=str_replace("\\", "/", $curr_dir); ...strange, isn't it?

« previous php.notes (#77191) next »