cakephp 2.5 - php url encode still being read as url not a string when being sent as a parameter -


i have folder outside of webfoot , using $this->response->file($path); display images inside.

my controller code works fine when pass in file name. need pass in part url. breaks. have tried use urldecode still sees url.

<?php echo ('<img src="books/sendfile/'.rawurlencode("38/backgrounds/orchard-left.png").'" width="100%" alt="aswq" />') ?> 

it outputted books/sendfile/38%2fbackgrounds%2forchard-left.png browser still sees books/sendfile/38/backgrounds/orchard-left.png

my controller

public function sendfile($file) {     $file = rawurldecode($file);     $path = root.ds.'bookuploads'.ds.'users'.ds.'ingemit/books/'.$file;     $this->response->file($path);     return $this->response; }  


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -