Re: N00b question: creating files
From: Pjotr Wedersteers (x33159_at_westerterp.com)
Date: 07/05/04
- Next message: mark: "Mass/dynamic find & replace"
- Previous message: josh: "Re: newbie can't get form working"
- In reply to: Garp: "Re: N00b question: creating files"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 5 Jul 2004 01:33:33 +0200
"Garp" <garp7@no7.blueyonder.co.uk> wrote in message
news:fN%Fc.4179$Hj1.36076737@news-text.cableinet.net...
>
> "Tom Thackrey" <use.signature@nospam.com> wrote in message
> news:YB%Fc.87596$gb6.19214@newssvr29.news.prodigy.com...
> >
> >
> > On 4-Jul-2004, "Pjotr Wedersteers" <x33159@westerterp.com> wrote:
> >
> > > Warning: fopen(logfiles\log1.txt): failed to open stream: Permission
> > > denied
> > > in script1.php on line 142
> >
> > try fopen('logfiles/log1.txt','w');
> >
> > backslash is an escape. Assuming the your filename was in quotes it
would
> be
> > interpreted as logfileslog1.txt, probably not what you want.
> >
> > fopen also requires the mode as the second parameter. 'w' for write, 'a'
> for
> > append, etc
> >
> > http://www.php.net/manual/en/function.fopen.php
>
> Your web server user needs write access to the folder you're trying to
> create in, too. Check at the console. And post source that doesn't work so
> we can see if there are obvious problems.
>
What a silly mistake of me to use the wrong windoze backslashes. SIGH. But
it works now, thanks for the pointers. Rights have been properly assigned
now, webuser has rw rights to the directory.
Back to the development table to further exploit that fine PHP! I like it
sofar!
Pjotr
- Next message: mark: "Mass/dynamic find & replace"
- Previous message: josh: "Re: newbie can't get form working"
- In reply to: Garp: "Re: N00b question: creating files"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|