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:

  1. move entity in entity subfolder, adjust namespace , references. standard symfony bundle dir layout.
  2. remove 1 level of ../

Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -