這很奇怪,有時候起作用,有時候不起作用。鏈接()操作不允許
我把var_dumps的鏈接()的參數。
string(35) "/printbox/web/repo/docusearch/5.pdf"
string(82) "/printbox/web/repo/hardlink/Oleaginosa Moreno Hnos. S.A._20130715_000532989552.pdf"
__
A PHP Error was encountered
Severity: Warning
Message: link(): Operation not permitted
Filename: controllers/ct_form_procesar_escaneos.php
Line Number: 178
__
string(35) "/printbox/web/repo/docusearch/6.pdf"
string(77) "/printbox/web/repo/hardlink/MOLINOS RIO DE LA PLATA_20130715_000533396947.pdf" //THIS WORKED !!!
__ 以上(這裏沒有錯誤,其實硬鏈接創建)編制
string(35) "/printbox/web/repo/docusearch/7.pdf"
string(77) "/printbox/web/repo/hardlink/RENOVA TIMBUES VICENTIN_20130715_000533520657.pdf"
__
A PHP Error was encountered
Severity: Warning
Message: link(): Operation not permitted
Filename: controllers/ct_form_procesar_escaneos.php
Line Number: 178
我真的找不到任何方式....當我做一個腳本來手動測試以前的一個,也失敗了:
<?php
echo "Hi";
link('/printbox/web/repo/docusearch/7.pdf', '/printbox/web/repo/hardlink/RENOVA TIMBUES VICENTIN_20130715_000533520657.pdf');
?>
Apache的日誌:
[Mon Jul 15 13:41:57 2013] [error] [client 192.168.100.204] PHP Warning: link(): Operation not permitted in /printbox/web/repo/a.php on line 3
在目標名稱中爲_條帶化空格沒有幫助。
謝謝!
這是什麼操作系統? – bansi
Debian服務器, – JorgeeFG
檢查硬鏈接是否已經存在。如果硬鏈接不是必須嘗試使用'symlink()' – bansi