|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Copying a picture in one folder to another using php
I tried copy(filepath, "file_destination"); but it did not work. How can I copy a picture file from one folder to another using php on Linux?
Last edited by oasis : May 16th, 2004 at 10:54 AM. Reason: left quotation mark |
|
#2
|
||||
|
||||
|
That's roughly how you do it, though presumably you're actually using real quoted or variable values rather than what you've supplied here. If it doesn't work, chances are that the Web server simply doesn't have permission on the folder you're trying to copy to.
__________________
Please don't PM me asking for solutions outside the scope of a thread. Keeping all responses in a thread stands to help others who come along later, which is after all what this forum's all about. |
|
#3
|
|||
|
|||
|
PHP Code:
is what I use. Make sure the directories you are moving files to have the CHMOD setting of 777 otherwise it won't work. |
|
#4
|
|||
|
|||
|
And make sure, that the server is not under safemode. This may interrupt the transfer.(sorry for the spelling
)- Pheifel |
|
#5
|
|||
|
|||
|
Does safemode effect move_uploaded_file? I thought it only affected things like mkdir or rmdir. Or is it variable between servers?
|
|
#6
|
|||
|
|||
|
i have had trouble uploading under safemode. Some renaming of files is not allowed under safemode as is some PHP rename functions and other name related and file related functions not allowed under safemode.
|
|
#7
|
|||
|
|||
|
well email your hoster and ask them to relax the UID check on safemode.
|
![]() |
| Viewing: Dev Articles Community Forums > Programming > PHP Development > Copying a picture in one folder to another using php |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|