premtemp Posted July 24, 2009 Share Posted July 24, 2009 hello, How do I convert a UNC path to the local path. for example, I have a shared folder where users can access some information (//serverx/sharex/folderx) and I would like to get the local path (e:\sharex\folderx). Does PHP has a function to do this? I am trying a read the folder and display the files and it it much faster to read using the local path. Thanks Quote Link to comment https://forums.phpfreaks.com/topic/167215-unc-to-local-path/ Share on other sites More sharing options...
ignace Posted July 24, 2009 Share Posted July 24, 2009 Is serverx the server on which php runs? Or do you want to access that server through php using something like fopen()? If the latter then you can not modify to e:/ as that would point to your own hard drive (in this case your cd- or dvd-rom). //serverx identifies a server on your network, everything after serverx (/sharex/folderx) identifies a resource on that specific server. Quote Link to comment https://forums.phpfreaks.com/topic/167215-unc-to-local-path/#findComment-881803 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.