|
-
July 27th, 2006, 02:42 PM
#1
Copy larger size file from a URL to your web server.
Anyone know how to copy a larger size file, say about 20mb, from a URL to your web server?
This works but only with small files.
PHP Code:
$filename = basename($file);
$handleread = fopen($file, 'r');
$handlewrite = fopen($filename, 'w');
while (!feof($handleread)) {
$source = fgets($handleread, 4096);
fwrite($handlewrite, $source);
}
fclose($handlewrite);
fclose($handleread);
If the post was helpful...Rate it! Remember to use [code] or [php] tags.
-
July 28th, 2006, 09:53 AM
#2
Re: Copy larger size file from a URL to your web server.
Interesting, I just used copy() and it works. Before I couldn't copy. The PHP manual says something about fopen wrappers. Is that enabled on most web servers?
If the post was helpful...Rate it! Remember to use [code] or [php] tags.
-
July 30th, 2006, 11:27 PM
#3
Re: Copy larger size file from a URL to your web server.
Well, it turns out that copy has a size limit. Anyone know what that is? Or is it the server limiting the size? Anyone know?
If the post was helpful...Rate it! Remember to use [code] or [php] tags.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|