file management
Moderator: General Moderators
file management
Dear Experts,
now i have a problem that is -
it is possible to copy a file (image) from one folder to any folder without any upload? that will be done in the server.
is there any way to do that?
now i have a problem that is -
it is possible to copy a file (image) from one folder to any folder without any upload? that will be done in the server.
is there any way to do that?
- Skittlewidth
- Forum Contributor
- Posts: 389
- Joined: Wed Nov 06, 2002 9:18 am
- Location: Kent, UK
- Skittlewidth
- Forum Contributor
- Posts: 389
- Joined: Wed Nov 06, 2002 9:18 am
- Location: Kent, UK
this is working
Code: Select all
copy("a.jpg","../movedfolder/b.jpg");- Skittlewidth
- Forum Contributor
- Posts: 389
- Joined: Wed Nov 06, 2002 9:18 am
- Location: Kent, UK
Absolute path
hi,
try giving absolute path
if you are working in a linux server
then give this
Else
try using chdir () function to change your current working directory and then copy
try giving absolute path
if you are working in a linux server
then give this
Code: Select all
copy("/var/www/html/old/a.jpg"."/var/www/html/new/b.jpg");try using chdir () function to change your current working directory and then copy
- Skittlewidth
- Forum Contributor
- Posts: 389
- Joined: Wed Nov 06, 2002 9:18 am
- Location: Kent, UK
You can also use the $_SERVER['document_root'] to work out the absolute path for your folders. Your folder must have the correct permissions as well.
EDIT
This should help you:
viewtopic.php?t=37902
As you can see I have been in your postition once before
EDIT
This should help you:
viewtopic.php?t=37902
As you can see I have been in your postition once before