I have just written my first php script that runs as a shell script. I
run it using CLI that comes with my Win32 distro of php (4.3.4).
Everything’s works nicely accept for one thing: ‘\n’ doesn’t work in my
echo statements. So in practices:
echo "hello\nwor ld"; becomes helloworld and not
hello
world
I have a suspicion that it has something to do with windows using a
different kind of new line syntax than Unix, but I can’t remember/find
an example of how it should be done.
In case this is the problem, what is the proper syntax, and if not what
is the problem then?
Joe
run it using CLI that comes with my Win32 distro of php (4.3.4).
Everything’s works nicely accept for one thing: ‘\n’ doesn’t work in my
echo statements. So in practices:
echo "hello\nwor ld"; becomes helloworld and not
hello
world
I have a suspicion that it has something to do with windows using a
different kind of new line syntax than Unix, but I can’t remember/find
an example of how it should be done.
In case this is the problem, what is the proper syntax, and if not what
is the problem then?
Joe
Comment