Skip to content
Advertisement

Tag: cakephp

How to get complete current url for Cakephp

How do you echo out current URL in Cake’s view? Answer You can do either From a view file: Which will give you the absolute url from the hostname i.e. /controller/action/params Or which should give you the full url with the hostname.

Cakephp: how to pass values into a javascript file?

I have some javascript that is being included in a view and I used inkedmn’s method in this thread: adding-page-specific-javascript-to-each-view-in-cakephp So I now have the following code in my view: But I need to pass some values from the view into the javascript file and I’m unsure of how to accomplish this. Update: I guess one option would be to

Why can’t CakePHP bake connect to MySQL running under EasyPHP on Windows Vista Ultimate?

I have CakePHP (cake_1.2.2.8120) and EasyPHP (3.0) installed on Windows Vista Ultimate. I followed the “baking” tutorials online and successfully set the database connection with the “cake bake” command from the CLI. I baked the controller for my “Users” table using the “php cake.php bake controller Users” command – worked fine. However, when I tried baking the view similarly, I

Advertisement