Jump to content


Photo

Read text file from local PC


  • Please log in to reply
2 replies to this topic

#1 ikmyer

ikmyer
  • Members
  • PipPipPip
  • Advanced Member
  • 109 posts
  • LocationIowa

Posted 15 May 2006 - 09:21 PM

Hello,

I have been working on this for a few hours now...
I am trying to read the contents of a file that is on the local pc ( computer loading the page ). I am trying to read a text file, find a certain line and then store some data of that line in another text file.
The problem I am having is I can't seem to get the file to open for reading... I get a permission denied error message. Is there a way around this or how can this be done. The page will only be accessed by a script that is calling the page and only PC's on the loca network will load it.

Thanks for any and all help!!

for some reason the site would not let me post code...


#2 _will

_will
  • Members
  • PipPip
  • Member
  • 25 posts

Posted 15 May 2006 - 09:46 PM

[!--quoteo(post=374132:date=May 15 2006, 05:21 PM:name=ikmyer)--][div class=\'quotetop\']QUOTE(ikmyer @ May 15 2006, 05:21 PM) View Post[/div][div class=\'quotemain\'][!--quotec--]
Hello,

I have been working on this for a few hours now...
I am trying to read the contents of a file that is on the local pc ( computer loading the page ). I am trying to read a text file, find a certain line and then store some data of that line in another text file.
The problem I am having is I can't seem to get the file to open for reading... I get a permission denied error message. Is there a way around this or how can this be done. The page will only be accessed by a script that is calling the page and only PC's on the loca network will load it.

Thanks for any and all help!!

for some reason the site would not let me post code...
[/quote]


What is the exact error message you are receiving and can you please paste the line of code where you open the file. If you post that information we can be of more help.

#3 trq

trq
  • Staff Alumni
  • Advanced Member
  • 31,041 posts

Posted 16 May 2006 - 12:32 AM

[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]I have been working on this for a few hours now..[/quote]
Wasted time.

Php runs on the server and cannot open files on a client (accept cookies).




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users