I have an Ubuntu Server and use rar with the exec() function. When I want to create a RAR archive from my files, this program uses their path in my RAR archive.
For example, if my file is in /home/user/video/some.flv and my php program is in /home/user, it will added as video/some.flv — however I want the file path to be some.flv.
I also don't want to copy my file to where my php program is, so I need a way to change the path. I used this:
rar rn archive.rar video/some.flv some.flv
… but when I try to extract it, it tells me the file label is "wrong or damaged". What can I do? I have many big files in different paths and want all of them to be in the root path of my RAR archive.