PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
Vladinator
Forum Newbie
Posts: 12 Joined: Mon Feb 28, 2005 6:08 pm
Post
by Vladinator » Sun Apr 17, 2005 12:29 pm
My problem is that when I run the script...
Code: Select all
$file = fopen("e;ftp://username:password@swede-wow.kicks-ass.org/somefile.txt"e;,"e;w"e;);
fwrite ($file, $text);
fclose ($file);
... I get the error...
Code: Select all
fopen(): URL file-access is disabled in the server configuration
I tried to add this line, in the php script file:
ini_set('allow_url_fopen', 1);
...But the same error, still comes. Any ideas?
feyd
Neighborhood Spidermoddy
Posts: 31559 Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA
Post
by feyd » Sun Apr 17, 2005 12:57 pm
Please read the posting code guidelines linked to in all posting pages and in my signature.
allow_url_fopen is a system level setting. That means it can only be changed in httpd.conf or php.ini.
shiznatix
DevNet Master
Posts: 2745 Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:
Post
by shiznatix » Sun Apr 17, 2005 12:58 pm
use php to connect to the ftp instead of the url.
$conn_id = ftp_connect($ftp_server);
// login with username and password
$login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass);