开发者

Shell Script for adding base_url to the php files

I have a website setup in which there are a lot of files mostly php. But in this i am calling the files as say /model/login/......

I want to r开发者_JAVA技巧ename all such occurences as $base_url/model/login/....

How can I approach the problem or where can I get the tutorials for the same.


sed can do this trivially, provided you don't use the path for anything else in the code.

sed -i 's!/model/login/!$base_url&!g' foo.php
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜