read a text file from my pc??
hi all..:wave:
this code makes me read data from a text file uploaded on server
Code:
$myFile = "data.txt";
$fh = fopen($myFile, 'r');
$theData = fread($fh, filesize($myFile));
fclose($fh);
echo $theData;
if is there is a way to read a text file from my pc like:
Code:
$myFile = "C:/data.txt";
$fh = fopen($myFile, 'r');
$theData = fread($fh, filesize($myFile));
fclose($fh);
echo $theData;
?????
Re: read a text file from my pc??
No - not without uploading it first. You have to use an input[type=file] and the functions for managing uploaded files.
Re: read a text file from my pc??
thx ;) i'll check it out!