can't get $file->moveTo("/myFolder") to work

Hi there, When using $file->moveTo("/myFolder") where should the "myFolder" be ? I've tried in the webroot, in public folder also, but with no success.

File is sended but not saved ...


The file is internally moved using the function move_uploaded_file (, usually the current path is where the bootstrap file is located (public/index.php?), you can get your current path by calling getcwd() (


Hi, thank you for help. I'm sorry, I can't get "moveTo" to work even by providing the file system path to "myFolder". But I've managed the task with move_uploaded_file($file->getTempName(), "images/".$file->getName());