0
我尝试使用收藏夹,我是按照代码在这个link所有步骤,但问题链接和图片帮助错误
<a href="images/image-1.jpg" rel="lightbox">
<img src="images/thumb-1.jpg" width="100" height="40" alt="" />
</a>
我把图片文件夹中的根目录
C:\wamp\www\tet\app\webroot\img\images
代替上面的代码我使用
$thumb = $this->Html->image('images/thumb-1.jpg');
$full = $this->Html->image('/images/image-1.jpg', array('rel' => 'lightbox'));
echo $this->Html->link($thumb,$full, array('escape' => false));
但我仍然看到这个错误
Missing Method in ImagesController
Error: The action <img src=" is not defined in controller ImagesController
Error: Create ImagesController::<img src="() in file: app\controllers\images_controller.php.
<?php
class ImagesController extends AppController {
var $name = 'Images';
function <img src="() {
}
}
?>
任何帮助,请
没有你的代码是不是真的,,因为我但图像文件夹,这样C:\ WAMP \ WWW \ TET \程序\ webroot的\ IMG \在这种情况下,图像 – user1080247 2011-12-23 12:58:46
删除前导斜杠。我已经更新了代码。 – Ehtesham 2011-12-23 13:12:01
不,它是不工作..当我点击图像链接产生像这样的http://localhost/tet/images/images/image-1.jpg...并仍然看到这个错误ImagesController中缺少方法 错误:动作图像未在控制器中定义ImagesController 错误:在文件:app \ controllers \ images_controller.php中创建ImagesController :: images()。 <?php class ImagesController extends AppController { \t var $ name ='Images'; \t功能的图像(){ \t} } ?> – user1080247 2011-12-23 13:39:08