In a controller, make a dummy action, name it like stackoverflow_with开发者_运维问答_something()//the WITH part is important
Create the view stackoverflow_with_something
Load up the page in a browser. Get a 'missing view error'
Take out the _with, try again. No error.
I havent seen any documentation on this, whats the deal?
short version : Why does xxxxx_with_xxxxx crash cakePHP, but xxxxx_xxxxx dosent?
No problems here, tried with the following:
/app/controllers/foos_controller.php:
<?php
class FoosController extends AppController {
var $uses = null;
function bar_with_yadda() {
}
}
?>
/app/views/foos/bar_with_yadda.ctp:
Hello
requesting /foos/bar_with_yadda
returns no error.
精彩评论