Re: write with cURL
- From: Tim Greer <tim@xxxxxxxxxxxxx>
- Date: Thu, 26 Feb 2009 09:36:57 -0800
user@xxxxxxxxxxxxxx wrote:
Hi,
I want do create a new file and write something in it like:
$file = fopen("test.txt","w");
fwrite($file,"Hello World. Testing!");
fclose($file);
My provider doesn't allow this action for security reasons. However
they mention using cURL to do the same thing.
I have been searching the Internet to find out how to do this, but did
not find the answer. A did find a lot of answers to others questions,
but not this one. ;-))
So any help is appreciated very much.
Cheers,
Ylva
If your host says they deny opening and writing to a local file because
it's insecure, then it's time you find a new host that knows what they
are doing. There's not much point to hosting on someone that offers
PHP, if they don't allow PHP to open (or create) and write to files.
Are you sure there's not some other specific issue of why it's failing?
How exactly is is failing? I don't see the reason for them to mention
Curl as a replacement method for your task (that doesn't make sense).
Perhaps it's a permissions/ownership issue, or you're trying to open a
file over FTP/http or something on another site or system? A lot of
people deny open for URL's, which can be a good thing, so it might
depend.
--
Tim Greer, CEO/Founder/CTO, BurlyHost.com, Inc.
Shared Hosting, Reseller Hosting, Dedicated & Semi-Dedicated servers
and Custom Hosting. 24/7 support, 30 day guarantee, secure servers.
Industry's most experienced staff! -- Web Hosting With Muscle!
.
- Follow-Ups:
- Re: write with cURL
- From: Ylva Poelman
- Re: write with cURL
- References:
- write with cURL
- From: user
- write with cURL
- Prev by Date: Re: REST in PHP frameworks
- Next by Date: Re: write with cURL
- Previous by thread: Re: write with cURL
- Next by thread: Re: write with cURL
- Index(es):
Relevant Pages
|
Loading