|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2008-09-28 21:25 UTC] muqtada at hotmail dot com
Description:
------------
i tried following script
print str_replace("wwwroot/test/wp","\");
its results in wwwroot est/wp
same time fuction is working fine on other orguments like
print str_replace("wwwroot/mycode/wp","\");
its results in wwwroot\mycode\wp
Expected result:
----------------
wwwroot/test/wp
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Dec 02 16:00:02 2025 UTC |
oops, i am sorry, yes i know it takes three arguments, i used following script print str_replace('\\',"/","wwwroot\test\wp2");Ok, but when i use echo addslashes("wwwroot\test\wp"); it still prints wwwroot est\\wp so even if use following $url= addslashes("wwwroot\test\wp"); echo str_replace("\\","/",$url); I would have put an exta slash if knew the string always :), since it is variable, i am be having problem at undersating, but i am getting my expected results using str_replace(); Thanks