cakephp - HTMLHelper link() added unintended path -
i believe simple question. maybe that's why can't find on google.
when inside view/product/view.ctp
echo $this->html->link('download pdf', 'app/files/product/1/manual.pdf');
the resulting url this:
app/products/app/files/product/1/manual.pdf
it automatically added app/products
since inside product's view.
how nullify automatic addition?
thanks
you're specifying relative url, causing browser append url current url.
echo $this->html->link('download pdf', '/app/files/product/1/manual.pdf');
(note leading slash /
)
should result in link http://example.com/app/files/product/1/manual.pdf
Comments
Post a Comment