Re: change server unix->win
| From: | Greg Donald | Date: | Wed, 20 Oct 2004 14:02:37 +0000 |
| Subject: | Re: change server unix->win | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-199888@lists.php.net to get a copy of this message | ||
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';
--
Greg Donald
Zend Certified Engineer
http://gdconsultants.com/
http://destiney.com/