cakephp函数调用

发布于 2024-08-26 09:49:30 字数 212 浏览 4 评论 0原文

调用cakephp函数有什么用 http://localhost/project/controller/method.hello

那你好呢? 但它需要views/method/hello/method.ctp...

whats the use of calling a cakephp function
http://localhost/project/controller/method.hello

so whats hello?
but it requires views/method/hello/method.ctp...

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

疯狂的代价 2024-09-02 09:49:30

您的描述中似乎存在一些错误。典型的 CAKEPHP url 应该类似于:

webroot/controller/method/argument

并且方法必须有一个视图文件。请参阅 cakephp 的典型请求

It seems there are some errors in your description.A typical CAKEPHP url should something like:

webroot/controller/method/argument

and a method must have a view file.See typical request of cakephp

爱要勇敢去追 2024-09-02 09:49:30

正如 SpawnCxy 所注意到的,也许您没有很好地理解请求的“哲学”。

无论如何,使用您可以定义自己的路由,但默认情况下请

/:controller:/:function:[/:arguments:]

记住您也可以使用 命名参数

As SpawnCxy noticed, maybe you did not understand well the request "philosophy".

Anyway, using routes you can define your own, but the default is

/:controller:/:function:[/:arguments:]

remember that you can also use Named Parameters

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文