At 01:02 PM 1/27/2002 -0500, Andre Amaral wrote:
>Thank you for the wuick response.
>Now. Can I make a script that works in both Linux and Windows without much
I'm currently working with a few developers to redesign my company's
website using PHP. I am developing on a Linux platform while some of the
other developers are using Windows. We are using CVS to merge our
individual changes into one main source tree.
So far this has been working really well. I've found that it's much easier
to develop on Linux first and then tweak any oddities on the Windows
side. For example, the following is only valid on Windows:
$file = "some\\relative\\path\\filename.ext";
But the following is valid on either platform:
$file = "some/relative/path/filename.ext";
Another example is case sensitivity. To Windows, "SomePath/filename.ext"
is the same as "somepath/filename.ext" but not on Linux. Since Linux is
the more picky of the two (for good reason) then it's easier to make sure
the case is correct on the Linux side. Just be careful and don't create
"Filename.ext" and "filename.ext" as two different files on the Linux side,
because Windows obviously won't be able to handle that.
I would say for 95% of basic scripts, you are not going to have any
troubles. You could run into problems would be scripts that work with the
filesystem (for example, umask() doesn't work on Windows). COM components
can only be used on Windows, so avoid them if your goal is platform
independence. Most DB functions behave exactly the same way, with minor
differences (for example, mssql_next_result() does not work if you are
using Linux/FreeTDS but it does on Windows)....etc. I've found that the
mail() function works exactly the same on either platform assuming you have
both servers configured properly.
My best advice is to develop on Linux first, periodically testing your
scripts on Windows and tweaking the oddities. It's not too tricky. Let me
know if you have questions...
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]