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)吗? –