file - Trying to access web/uploads/produits/img Symfony2 -
i'm trying upload file , place in web/uploads/produits/img
directory code bellow not working:
public function getuploaddir() { return 'uploads/produits/img'; } protected function getuploadrootdir() { return __dir__.'/../../../../web/'.$this->getuploaddir(); }
i folowing error:
could not move file "c:\wamp\tmp\php9265.tmp" "c:\wamp\www\projet\src\arkiglass\produitbundle/../../../..\web/uploads/produits/img\." (move_uploaded_file() [function.move-uploaded-file]: unable move 'c:\wamp\tmp\php9265.tmp' 'c:\wamp\www\projet\src\arkiglass\produitbundle/../../../..\web/uploads/produits/img\.')
it's seems doesn't know directory __dir__.'/../../../../web/'
...
it doesn't seem entity lives under entity directory, rather directly under bundles dir. it? you're going 1 dir much. 2 options:
- move entity in
entity
subfolder, adjust namespace , references. standard symfony bundle dir layout. - remove 1 level of
../
Comments
Post a Comment