You need to open the file in IIS. This code opens without problems
$filename = 'C:/web/files/test.txt''; file_get_content($filename); But this code causes an error:
$filename = $_SERVER['DOCUMENT_ROOT'] . '/files/test.txt'; file_get_content($filename); Warning: file_get_contents(C:\web/files/test.txt): failed to open stream: No such file or directory in I tried this option:
$filename = addslashes($_SERVER['DOCUMENT_ROOT'] . '\\files\\test.txt'); file_get_content($filename); But also a mistake.
How to open this file in IIS?
Windows Server 2008 R2
PHP 5.6
teXt.txtis written? - VismanDIRECTORY_SEPARATORphp.net/manual/ru/dir.constants.php - Visman