How to access images under writable folder |
just to clarify , you upload images to a directory and simply want to "see them" in a view using <img src = . Is that correct, you don't want to access them to work on them?
for an image in writable to be seen in a view, in view it would be : Code: <img src = "<?php echo WRITEPATH.'imagename.jpg'); ?>" > you can upload images using a form with in form: Code: <?= form_open_multipart('name_Of_route_Post_IS_GoingTo'); ?> in controller named by route get name image: Code: $file = $this->request->getFile('productImage'); then using FILE you can do: Code: $file->move(ROOTPATH.'public/productImages',$nameImgFile); |
Welcome Guest, Not a member yet? Register Sign In |