You're right about it being a Windows limitation (versus an NTFS file system limitation):
MSDN Library wrote:In the Windows API, the maximum length for a path is MAX_PATH, which is defined as 260 characters. A path is structured in the following order: drive letter, colon, backslash, components separated by backslashes, and a null-terminating character, for example, the maximum path on the D drive is D:<256 chars>NUL.
Thanks, Micro$oft. 😉
You could try this workaround:
MSDN Library wrote:The Unicode versions of several functions permit a maximum path length of approximately 32,000 characters composed of components up to 255 characters in length. To specify that kind of path, use the "\?\" prefix. The maximum path of 32,000 characters is approximate, because the "\?\" prefix can be expanded to a longer string, and the expansion applies to the total length.
(Both quotes taken from this MSDN Library page.)
EDIT: A quick stab at using [man]file_get_contents/man with the Unicode version didn't turn out too well:
Warning: file_get_contents(\?\C:\php\test.php): failed to open stream: Bad file descriptor in C:\php\test.php on line 2
Since PHP 6 is supposed to be more Unicode-friendly (or so I thought?), however, perhaps it will make use of these Unicode API functions that the MSDN article above was talking about? I might play around with that later tonight and post back with my results...
EDIT2: Forgot to come back and comment... PHP 6 is old news, I simply meant the "trunK" version, which is something like 5.3.99.