Re: change server unix->win
| From: | Francisco M. Marzoa Alonso | Date: | Wed, 20 Oct 2004 14:22:12 +0000 |
| Subject: | Re: change server unix->win | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-199893@lists.php.net to get a copy of this message | ||
Just a point: this will be a problem if they have some forward slashes that are not specifying file paths, i.e. URLs in the code like http://www.whereveryouwant.com/ will be substituted by http:\\www.whereveryouwant.com\
Greg Donald wrote:
On Wed, 20 Oct 2004 13:17:08 +0200, Patrick Fehr <fehrp@ee.ethz.ch> wrote:I have a serious problem: The client want's to emigrate the webhosting from a unix server to a windows server. Now my biggest problem are the path's. Is there a way to fast convert all the /root-style directories into the windows standard \ ?? Thanks for your consideration, I have the strong feeling that this is much work coming.A small sed script would easily handle this conversion. I doubt you have any of those on windows so I'd do the conversion before moving. for file in *.php; do cp $file $file.tmp sed -e "s/\//\\\\/g" $file.tmp >$file rm $file.tmp done Remember on windows you will be dealing with backslashes instead of forward slashes, and you have to escape the backslashes with backslashes. $path = '/usr/local/blah'; will be something like: $path = 'c:\\inetpub\\www';