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

Posted by Kimmo Laine on 11/06/05 21:00

"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

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