Develop on Windows ... then Deploy on Linux
I can just FEEL that this is a stupid question before I ask it, but I can't quite figure out why. Please don't laugh. I am completely new at this stuff.
I hire a Linux web server located thousands of miles away. I do my development at home. Mine's a PC, theirs is a Linux. Little things like include files don't work properly because of the difference in referencing.
I notice that when I run phpinfo(), one of the things it does is tell you the OS. So ... what I would really like to do is be able to develop on my home Windows-based laptop and get everything working just fine on Windows, include files and all, and then just upload and deploy straight to web, knowing that it will work just fine there as well, because the difference in OS will be detected, and the relevant path used.
I started trying to do this, but it just seemed too simple an idea, so I am suspicious. Is it in fact possible to put some kind of an 'if-else' clause at the beginning of a file so that it can then use one set of path references for includes and so forth if it is in one environment, but use another if it is in another? Would getenv() or $_ENV do this for me?
I don't mind doing the work to learn and get it right if it is doable ... but I also don't want to waste my time if it isn't, and am wondering if one of you gurus out here could give me a heads-up on these possibilities before I go any further.