0
我試圖獲取文件的路徑。嘗試獲取文件的路徑 - 輸入類型=文件 - PHP
有我的代碼:
$htmlcode = '<input type="file" id="fileinput" placeholder="Recherche QR Code" title="Recherche à partir d\'un fichier .txt" />';
$path = "";
getTabQrCode($path);
function getTabQrCode($path){
$tab_qr = Array();
$index = 0;
$file_handle = fopen($path, "r");
while (!feof($file_handle)) {
$line_of_text = fgets($file_handle);
$parts = explode('=', $line_of_text);
print $parts[0] . $parts[1]. "<BR>";
$tab_qr[$index] = $parts[0];
$index++;
}
$index = 0;
fclose($file_handle);
}
echo $htmlcode;
我想$路該如何走上傳的文件的路徑的價值... 這可能嗎?
你的意思是訪問者的本地計算機上的文件的路徑?我不認爲這是可能的。考慮與我們分享你的主要目標,你試圖達到的目標。 –
你看過[PHP文檔](http://php.net/manual/en/features.file-upload.php)嗎? –