|
|
|
|
![]() ![]() |
May 17 2005, 04:10 PM
Post
#1
|
|
|
Premium Member Group: Members Posts: 230 Joined: 15-May 05 From: your sister Member No.: 5,102 |
Hi there,
I have a code which grabs an xml-file from another location, reads it and puts the content into al local file. I use fopen, fwrite and fclose. The code goes like this: <?php $local_file = 'lala.xml'; $fd1 = @fopen ('http://www.example.com/lulu.xml', 'r'); while ($line=fgets($fd1,4000)) $alltext.=$line; $fd2 = @fopen('lala.xml', 'w'); @fwrite($fd2, $alltext); @fclose($fd1); @fclose($fd2); ?> On my Apache at home everything works fine. But it doesn't work on the astahost server. I thought all I needed was allow_url_fopen being set to ON and safemode OFF. As far as I understand the PHP information in my accounts phpinfo.php it should all work. Does anybody have an idea why the file is not written? Thank U |
|
|
|
May 17 2005, 05:11 PM
Post
#2
|
|
|
Premium Member Group: Members Posts: 208 Joined: 6-September 04 From: England Member No.: 315 |
You may have to change the lala.xml permissions to 777 to be able to read, write and execute the file. You can do that in the File Manager. that should work.
|
|
|
|
May 17 2005, 05:22 PM
Post
#3
|
|
|
Premium Member Group: Members Posts: 230 Joined: 15-May 05 From: your sister Member No.: 5,102 |
Sooooo cool! It works! Thank you very much, overture! I'm sooo stupid, I should have known that 777 thingy.
Thank U! |
|
|
|
May 17 2005, 06:04 PM
Post
#4
|
|
|
PsYcheDeLiC dR3aMeR Group: Admin Posts: 2,242 Joined: 29-January 05 From: Nakorn Chaisri, Thailand Member No.: 2,411 myCENTs:84.36 |
Issue resolved.
|
|
|
|
![]() ![]() |
Similar Topics
|
Lo-Fi Version | Time is now: 2nd December 2008 - 09:27 PM |