Welcome Guest, Not a member yet? Register   Sign In
Defining FCPATH
#8

(10-28-2015, 04:30 AM)InsiteFX Wrote: The Windows file::// as you can see does use forward slashes. Look in your browser if you open a file html etc;

The browser converts the file URI into a path usable by the file system. The file systems supported by Windows don't generally use or understand file URIs on their own. MSDN has a detailed blog post about how this was done for IE7 which includes the names of the Windows API functions that perform the conversion (PathCreateFromUrl and UrlCreateFromPath). Those API functions reside in the Windows Shell API, which is a subsystem of the Windows Desktop Environment.

Generally, the Data Access and Storage subsystems in Windows, and especially the local file system APIs, don't understand file:// URIs, they only accept paths in the form \\host\share\directory or C:\directory (where C can be any valid drive letter).

From the few instances I could find in the source code, it appears that PHP performs its own conversion of Windows paths, rather than utilizing the Windows API. This is probably at least in part because the API functions were added primarily for the use of Microsoft's applications, and were not available (or documented) throughout most of the time in which PHP has included this functionality.
Reply


Messages In This Thread
Defining FCPATH - by Tpojka - 10-26-2015, 10:08 AM
RE: Defining FCPATH - by Avenirer - 10-27-2015, 06:19 AM
RE: Defining FCPATH - by Tpojka - 10-27-2015, 06:58 AM
RE: Defining FCPATH - by mwhitney - 10-27-2015, 09:13 AM
RE: Defining FCPATH - by Tpojka - 10-27-2015, 10:35 AM
RE: Defining FCPATH - by InsiteFX - 10-28-2015, 04:30 AM
RE: Defining FCPATH - by mwhitney - 10-28-2015, 09:29 AM
RE: Defining FCPATH - by Tpojka - 10-28-2015, 04:47 AM



Theme © iAndrew 2016 - Forum software by © MyBB