我有以下代碼:網絡驅動器在Windows使用PHP的FOPEN
$file_name = "1234";
$filename = "L:\\videoette_converter\\batch_files\\".$file_name.'.bat';
if (!$handle = fopen($filename, 'a')) {
echo "Cannot open file ($filename)";
exit;
}
我從代碼以下錯誤:
警告:的fopen(L:\ videoette_converter \ batch_files \ 1234.bat) [function.fopen]:未能打開流:在 C無這樣的文件或目錄:\瓦帕\ WWW \ videoette_converter \的index.php上線47
,並從我的PHP
無法打開文件(L:\ videoette_converter \ batch_files \ 1234.bat)調試線
但是該文件夾L:\videoette_converter\batch_files
確實存在映射驅動器,和我已經給「每個人」都有完全的權限可能是什麼問題呢?
也許這個職位上的PHP手冊可以幫助你: http://www.php.net/manual/en/function.fopen.php#83138 – 2012-01-31 11:17:40
乾杯。將路徑改爲''\\\\ LAPTOP \\ laptopwww \\ videoette_converter \\ batch_files \\。。$ file_name。「。bat」',並將'wampapache'的服務用戶改爲'NT AUTHORITY \ NetworkService'(嘗試使用我的帳戶,'彗星',沒有工作)..但仍然被拒絕。 – rickyduck 2012-01-31 13:18:59