Hi
I would ask how can I access to $this-webroot controller's variable
from a model?
Many Thanks
Marco
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others
with their CakePHP related
use Helper::url('/')
2012/1/2 byqsri marco.rizze...@gmail.com
Hi
I would ask how can I access to $this-webroot controller's variable
from a model?
Many Thanks
Marco
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions
Laerte M. Rodrigues
You meant Router::url(), right?
It will return proper value through web, but not in cli at edge cases.
Recommended way is manually to use Model::set() method or receive
value via property, like $Post-webroot = $this-webroot(or
Post::$webroot = ...).
Because testing it is
I use Cakephp 2.0 and the static method Helper::url('/') return the URL
from WebRoot
2012/1/2 清水紘己 hiromi2...@gmail.com
Laerte M. Rodrigues
You meant Router::url(), right?
It will return proper value through web, but not in cli at edge cases.
Recommended way is manually to use Model::set()
he is probably need absolute path for webroot, not browser :)
--
Lep pozdrav, Tilen Majerle
http://majerle.eu
2012/1/2 Laerte M. Rodrigues laertemat...@gmail.com
I use Cakephp 2.0 and the static method Helper::url('/') return the URL
from WebRoot
2012/1/2 清水紘己 hiromi2...@gmail.com
if they have the absolute path, use const WEBROOT_DIR
2012/1/2 Tilen Majerle tilen.maje...@gmail.com
he is probably need absolute path for webroot, not browser :)
--
Lep pozdrav, Tilen Majerle
http://majerle.eu
2012/1/2 Laerte M. Rodrigues laertemat...@gmail.com
I use Cakephp 2.0 and