Re: [PHP] Help with files
On Monday 02 February 2004 10:33, Mr. Austin wrote: $buff = fopen(sample.txt, r+); ^ ---+ RTFM to see what other options you can use. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* Give your very best today. Heaven knows it's little enough. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Help with files
I'm not entirely sure why it is that you assume I did not read the manual or the online documentation (which is very thorough). I'll find my answers elsewhere. Thank you, Mr. Austin - Original Message - From: Jason Wong [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, February 01, 2004 8:43 PM Subject: Re: [PHP] Help with files On Monday 02 February 2004 10:33, Mr. Austin wrote: $buff = fopen(sample.txt, r+); ^ ---+ RTFM to see what other options you can use. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* Give your very best today. Heaven knows it's little enough. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Help with files
Mr. Austin wrote: Hello all, I am trying to open a file (successful), then rewrite over the file when it is saved via a form on a website. I have used the following code, yet it simple rewrites from the file pointer, but does not clear the file before writing. Thanks for any help. ?php $buff = fopen(sample.txt, r+); $text = This is new text for yay; if(!fwrite($buff, $text)) { print(Unable to write to file); } else { print(File written successfully); } ? Use the manual, Luke. http://us4.php.net/manual/en/function.fopen.php The word you're looking for here is 'truncate'. -- By-Tor.com It's all about the Rush http://www.by-tor.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Help with files
Mr. Austin wrote: I'm not entirely sure why it is that you assume I did not read the manual or the online documentation (which is very thorough). I'm sure Jason has made that assumption because the answer to your question is right there in the manual...under one of the functions you're using. I'll find my answers elsewhere. Try the manual. http://us4.php.net/manual/en/function.fopen.php -- By-Tor.com It's all about the Rush http://www.by-tor.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Help with files
Instead of using r+, use w This will clear the file for you :) -Original Message- From: Mr. Austin [mailto:[EMAIL PROTECTED] Sent: Monday, 2 February 2004 1:51 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] Help with files I'm not entirely sure why it is that you assume I did not read the manual or the online documentation (which is very thorough). I'll find my answers elsewhere. Thank you, Mr. Austin - Original Message - From: Jason Wong [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, February 01, 2004 8:43 PM Subject: Re: [PHP] Help with files On Monday 02 February 2004 10:33, Mr. Austin wrote: $buff = fopen(sample.txt, r+); ^ ---+ RTFM to see what other options you can use. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* Give your very best today. Heaven knows it's little enough. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HELP: Writing Files securely from apache php module
This is something I have been battling with for ages. I finally decided on just setting up a system that saves the files to a world-writeable temp directory, then uploads them via FTP. If anyone has a better solution, I would *love* to hear it. Mike Michael Blower wrote: Can some one explain how to write file php in the apache module version of php ? I don't want to make the directories world writable, or writable by web clients. How is this accomplished. Sorry if the is a really newbie question. Michael Blower [EMAIL PROTECTED] [EMAIL PROTECTED] 707 468 1258 707 272 2020 cell -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] help: unzip files for php 3.0
On Mon, 2 Jul 2001 12:55:32 -0700 (PDT), John Holcomb ([EMAIL PROTECTED]) wrote: The company that houses our servers only has php 3.0 installed. I need a function that can unzip files. Are there any methods(functions) that can handle this in php3.0 or any version of php that's before php 4.0. Thank you, you could do something like: exec(pkzip $file); John __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: php-list- [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] HELP!!! Upload files!!!!
Warning: Rename failed (Invalid cross-device link) in /usr/local/etc/httpd/htdocs/intranet/upload.php on line 26 In Un*x, you can't "rename" a file from one hard drive onto another. That's what you are trying to do. Change your use of rename() to be copy() instead. -- Visit the Zend Store at http://www.zend.com/store/ Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]