我正在使用 CakePHP。
今天我试图将页面控制器的页面链接到页面控制器的另一个页面,直到我写下我才能看到链接
<?= $this->Html->link('myPage', array('controller' => 'pages', 'action' => 'myPage')); ?>
Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
为什么我必须写<?=而不是<?php?
<?=
<?php
一般来说,我什么时候必须使用<?=什么时候<?php?
<?=简称<?php echo
<?php echo
添加echo到您的代码中,它将起作用。
echo
这不是 CakePHP 独有的,它只是 PHP 的一部分。