ludjer Posted January 6, 2009 Share Posted January 6, 2009 whats the difference between file systems in Linux and windows im doing a project on my windows pc, but it will be running on a linux server now i need to know what are the main differences when it comes to handling files on different files system? thanks alot in advance Quote Link to comment https://forums.phpfreaks.com/topic/139668-solved-whats-the-difference-between-file-systems-in-linux-and-windows/ Share on other sites More sharing options...
thedarkwinter Posted January 6, 2009 Share Posted January 6, 2009 hi php itself will handle most of the file sytems differences, but there are some things you need to do, such as: 1. windows uses \ and linux uses / 2. windows uses drive letters, linux does not. Usually its better to use relatives paths. example: opening a file //Win: note the backslashes $file = fopen("c:\\temp\\myfile.txt", "r"); //Lin: $file = fopen("/tmp/myfile.txt", "r"); while my windows knowledge is pretty basic, feel free to ask more if i have missed something in your question. cheers, tdw Quote Link to comment https://forums.phpfreaks.com/topic/139668-solved-whats-the-difference-between-file-systems-in-linux-and-windows/#findComment-730879 Share on other sites More sharing options...
ludjer Posted January 6, 2009 Author Share Posted January 6, 2009 thanks alot that helped Quote Link to comment https://forums.phpfreaks.com/topic/139668-solved-whats-the-difference-between-file-systems-in-linux-and-windows/#findComment-730915 Share on other sites More sharing options...
corbin Posted January 7, 2009 Share Posted January 7, 2009 It's worth noting that Windows handles / fine, but linux does not handle \ well. So, use paths with / if you're using relative paths. Quote Link to comment https://forums.phpfreaks.com/topic/139668-solved-whats-the-difference-between-file-systems-in-linux-and-windows/#findComment-731334 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.