Re: Trouble with fopen() || Win2k Machine
| From: | CF High | Date: | Fri, 06 Jun 2003 19:25:14 +0000 |
| Subject: | Re: Trouble with fopen() || Win2k Machine | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-150517@lists.php.net to get a copy of this message | ||
Thanks for the suggestion.
Still no luck though with the file path on windows; e.g. file path is
http://192.168.1.2/dev_files/drop_down.js
So, when I open the file for writing: $fw = fopen($file_path, "wb") an error
results ("can't open file")
Looks like I need to escape out of slashes within the file path on windows.
In any case, thanks for the idea -- it's a step in the right direction,
--Noah
"Ptker" <ptker@hotmail.com> wrote in message
news:20030606134317.88117.qmail@pb1.pair.com...
> If the file is binary, try fopen($file_path, "wb");
> "Cf High" <noah@newminddesign.com> ~{P4HkO{O"PBNE~}
> :20030605223259.29500.qmail@pb1.pair.com...
> > Hey all.
> >
> > Quick question here that's driving me up the wall:
> >
> > Using fopen(), I'm easily able to open files for reading; however, when
I
> > attempt to open files for writing using fopen($file_path, "W+"), an
error
> > occurs.
> >
> > I'm able to use fopen($file_path, "a+"), but I need to be able to
> overwrite
> > files; not write to the end of the file.
> >
> > Again, I'm testing on windows here..........
> >
> > Any suggestions greatly appreciated,
> >
> > --Noah
> >
> >
>
>