[PHP] File Copy

2004-10-20 Thread Aidal
Hi NG. I'm experiencing some problems when trying to copy a file from one location to another on the web server. example: dir1/subdir1/some_image_name.jpg -- dir2/subdir2/some_new_image_name.jpg When I do this the file permissions changes and I'm no longer the owner of the file. I tried to

Re: [PHP] File Copy

2004-10-20 Thread Silvio Porcellana
Aidal wrote: Hi NG. I'm experiencing some problems when trying to copy a file from one location to another on the web server. example: dir1/subdir1/some_image_name.jpg -- dir2/subdir2/some_new_image_name.jpg When I do this the file permissions changes and I'm no longer the owner of the file. I

Re: [PHP] File Copy

2004-10-20 Thread Aidal
ftp_chmod() is part of PHP 5 and I'm working with PHP 4.3.1. I tried the ftp_raw('CHMOD 777 filename.jpg'); doesn't work either though :( Silvio Porcellana [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Aidal wrote: Hi NG. I'm experiencing some problems when trying to copy a

Re: [PHP] File Copy

2004-10-20 Thread M. Sokolewicz
how about setting the correct umask. Or else su'ing to the correct user before moving it. Aidal wrote: ftp_chmod() is part of PHP 5 and I'm working with PHP 4.3.1. I tried the ftp_raw('CHMOD 777 filename.jpg'); doesn't work either though :( Silvio Porcellana [EMAIL PROTECTED] wrote in message

Re: [PHP] File Copy

2004-10-20 Thread Aidal
ERR, I meant I tried ftp_exec(), ftp_raw() is a PHP 5 function too... Aidal [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] ftp_chmod() is part of PHP 5 and I'm working with PHP 4.3.1. I tried the ftp_raw('CHMOD 777 filename.jpg'); doesn't work either though :( Silvio Porcellana

Re: [PHP] File Copy

2004-10-20 Thread Chris Dowell
Aidal Could you post the relevant parts of your code so we have a little context to work in? You say you're copying a file from one location to another on the same server. If this is the case you are very unlikely to be in need of the ftp family of functions, which are only valid for use over

Re: [PHP] File Copy

2004-10-20 Thread Silvio Porcellana
Chris Dowell wrote: Aidal Could you post the relevant parts of your code so we have a little context to work in? You say you're copying a file from one location to another on the same server. If this is the case you are very unlikely to be in need of the ftp family of functions, which are only

Re: [PHP] File Copy

2004-10-20 Thread Dusty Bin
Aidal, presumably, your server had the write to copy the file, otherwise the copy would have failed. Is the only problem that you don't have the correct permissions on the copied file?? if so check out http://www.php.net/manual/en/function.umask.php. If you set the umask before you copy,

[PHP] file copy

2003-02-03 Thread Cenk Uysal
hi, how can i copy a file from web to my local disk? http://www.xxx.com/xxx.gif i try to get xxx.gif to my local disk... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] file copy

2003-02-03 Thread Maxim Maletsky
You must change the headers for the file so it is being downloaded. Something like this: header('Content-Type: GIF'); // not sure of this one header('Content-Length: ' . filesize('file.gif'));

[PHP] File Copy

2002-03-01 Thread Andy Delcambre
I am a complete php newbie but i have a quick question I was wondering if there is a way to copy a file from a remote site to your local server? I want to grab a picture off of a site and store it locally to be displayed later Thanks alot, Andy -- PHP General Mailing List