You are here: Re: writing files to a choosen directory « All PHP « IT news, forums, messages
Re: writing files to a choosen directory

Posted by Ian Davies on 11/06/05 21:34

OK
I done it
I didnt need the htdocs bit in the path
Ian

"Ian Davies" <iandan.dav@virgin.net> wrote in message
news:RNsbf.10378$Ua6.8826@newsfe6-win.ntli.net...
> That gives the following message
>
> Warning: fopen(../htdocs/Downloads/ptqiandandav1131304863.txt): failed to
> open stream: No such file or directory in
> e:\domains\i\iddsoftware.co.uk\user\htdocs\QuestionDB\notify.php on line
43
> Could not open the text file for writing
>
> but the directory does exist
>
> Is the file local if its in a directory on my hosts server ?
>
> "Kimmo Laine" <antaatulla.sikanautaa@gmail.com.NOSPAM.invalid> wrote in
> message news:dkljrq$3il$1@phys-news1.kolumbus.fi...
> > "Ian Davies" <iandan.dav@virgin.net> kirjoitti
> > viestissδ:Lgpbf.9822$Ua6.3680@newsfe6-win.ntli.net...
> > >
> > > Hello
> > > I have the following code which changes directory, creates a file and
> then
> > > writes rows to it. It works fine except the file is created in the
> folder
> > > the php script is in instead of the download directory specified in
the
> > > scrip. Can anyone see where I have gone wrong
> > > Also I want to show the question Index and Question on screen as a
list.
> > > Ive put
> >
> >
> > Your code opens an ftp connection, but it doesn't write to it. it does
> > change the directory in the ftp-connection, but that is irrelevant if
you
> > are writing to a local file. Just change the code to $fp =
> > fopen('../htdocs/Downloads/ptq'.$_SESSION['username'].time().'.txt',
> 'w'));
> > and remove the ftp-stuff, and you're good to go.
> >
> > --
> > SETI @ Home - Donate your cpu's idle time to science.
> > Further reading at <http://setiweb.ssl.berkeley.edu/>
> > Kimmo Laine <antaatulla.sikanautaa@gmail.com.NOSPAM.invalid>
> >
> >
>
>

 

Navigation:

[Reply to this message]


УдалСнная Ρ€Π°Π±ΠΎΡ‚Π° для программистов  •  Как Π·Π°Ρ€Π°Π±ΠΎΡ‚Π°Ρ‚ΡŒ Π½Π° Google AdSense  •  England, UK  •  ΡΡ‚Π°Ρ‚ΡŒΠΈ Π½Π° английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Π‘Π°ΠΉΡ‚ ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ Π² Π‘Ρ‚ΡƒΠ΄ΠΈΠΈ Π’Π°Π»Π΅Π½Ρ‚ΠΈΠ½Π° ΠŸΠ΅Ρ‚Ρ€ΡƒΡ‡Π΅ΠΊΠ°
ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ΠΈΠ΅ ΠΈ ΠΏΠΎΠ΄Π΄Π΅Ρ€ΠΆΠΊΠ° Π²Π΅Π±-сайтов, Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚ΠΊΠ° ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΠ½ΠΎΠ³ΠΎ обСспСчСния, поисковая оптимизация