- Jul 6, 2002
- 46
- 0
- 0
I am running Apache server with php 4.0
This is the function of reading file.
I can read file when the file is in the computer of the server. If a client access the readfile function, it only know to search for the file in the server, but it suppose to read the file that is in client's computer. Therefore, when $TheFile is the path of file refer to client computer, there is warning message that "No such file or directory"
Does anyone know how to code in order to read the file in client's computer ??
function ReadFromFile($TheFile)
{
$Open = fopen ($TheFile, "r");
if($Open){
$Data = file ("$TheFile");
fclose($Open);
}
else{
print ("Unable to read from $TheFile!
\n");
}
return $Data;
}
This is the function of reading file.
I can read file when the file is in the computer of the server. If a client access the readfile function, it only know to search for the file in the server, but it suppose to read the file that is in client's computer. Therefore, when $TheFile is the path of file refer to client computer, there is warning message that "No such file or directory"
Does anyone know how to code in order to read the file in client's computer ??
function ReadFromFile($TheFile)
{
$Open = fopen ($TheFile, "r");
if($Open){
$Data = file ("$TheFile");
fclose($Open);
}
else{
print ("Unable to read from $TheFile!
\n");
}
return $Data;
}