Understanding how to construct paths
Posted: Thu May 07, 2009 2:12 pm
I am writing code that will operate both on the Mac and on Windows boxes. As anyone knows who has worked on both platforms, Mac and Windows paths are different. If I can tell which box the client is, I can construct the path according to that box's style. How can I tell what the client is.
1.) Specifically, I am downloading using FTP in PHP. How can I tell what the platform is?
2.) When the time comes to upload, from the client, do I need any special syntax in the path to let the script know that I am downloading from the client, or will FTP figure that one out?
I have looked at the PHP site and at the PHP references I have, but none of them cover it, that I can find out. I also looked at the $_SERVER array and found nothing helpful there without a lot of parsing
1.) Specifically, I am downloading using FTP in PHP. How can I tell what the platform is?
2.) When the time comes to upload, from the client, do I need any special syntax in the path to let the script know that I am downloading from the client, or will FTP figure that one out?
I have looked at the PHP site and at the PHP references I have, but none of them cover it, that I can find out. I also looked at the $_SERVER array and found nothing helpful there without a lot of parsing