Re: fopen() with permissions?

From: Date: Wed, 06 Nov 2002 23:00:32 +0000
Subject: Re: fopen() with permissions?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-123083@lists.php.net to get a copy of this message
Ernest E Vogelsinger wrote... > Why don't you do it this way: > > $fp = > fopen("ftp://username:password@domain.com/folder/file.prefs", > "w"); > fwrite($fp, 'Some content', 12); > fclose($fp); > > I don't see a reason why you shouldn't directly use the file handle > returned by fopen - that's why the PHP god has created it :) A very good point, and this will work for me. I mentioned in my first note that I'm afraid that this is about 1,000 times slower than creating/writing a "local" file, but I don't see that I have an option. Thank you! -- Charles Wiltgen "Well, once again my friend, we find that science is a two-headed beast. One head is nice, it gives us aspirin and other modern conveniences... but the other head of science is bad! Oh beware the other head of science...it bites!" -- The Tick

« previous php.general (#123083) next »