Php Yii引导转盘无法显示图像
我无法显示我在应用程序中输入的图像: 这是我的代码:/protected/views/site/index.phpPhp Yii引导转盘无法显示图像,php,yii,Php,Yii,我无法显示我在应用程序中输入的图像: 这是我的代码:/protected/views/site/index.php <?php /* @var $this SiteController */ $this->pageTitle=Yii::app()->name; ?> <h1>Welcome to <i><?php echo CHtml::encode(Yii::app()->name); ?></i></h
<?php
/* @var $this SiteController */
$this->pageTitle=Yii::app()->name;
?>
<h1>Welcome to <i><?php echo CHtml::encode(Yii::app()->name); ?></i></h1>
<p>Congratulations! You have successfully created your Yii application.</p>
<p>For more details on how to further develop this application, please read
the <a href="http://www.yiiframework.com/doc/">documentation</a>.
Feel free to ask in the <a href="http://www.yiiframework.com/forum/">forum</a>,
should you have any questions.</p>
<?php $this->widget('bootstrap.widgets.TbCarousel', array(
'items'=>array(
array(
'image'=>'/../images/1.jpg',
'label'=>'First Thumbnail label',
'caption'=>'ooo'),
array(
'image'=>'/../images/2.jpg',
'label'=>'Second Thumbnail label',
'caption'=>'weee'),
array(
'image'=>'/../images/3.jpg',
'label'=>'Third Thumbnail label',
'caption'=>'pooops'),
),
)); ?>
欢迎来到
恭喜你!您已成功创建Yii应用程序
有关如何进一步开发此应用程序的更多详细信息,请阅读
这个
请随时在,
你有什么问题吗
我已将图像文件放在正确的目录中。有什么建议吗?谢谢
<?php $this->widget('bootstrap.widgets.TbCarousel', array(
'items' => array(
array(
'image' => 'images/one.jpg',
'label' => '',
'caption' => ''),
array(
'image' => 'images/two.jpg',
'label' => '',
'caption' => ''),
array(
'image' => 'images/three.jpg',
'label' => '',
'caption' => ''),
),
确保您在www/wamp/project/images中有图像,您可以尝试:
array('image' => Yii::app()->request->baseUrl.'/images/photo.jpg', 'label' => 'projektet', 'caption' => 'teksti'),
如果使用chrome,请使用inspect元素查看图像是否在旋转木马中。如果它们是,那么当你将鼠标悬停在url上时,你可以看到我也看到过的图像。但是,chrome“加载资源失败:服务器响应状态为404(未找到)”。是否将图像放在默认图像文件夹下?当然可以。但是为什么我的应用程序无法加载这些图像?我如何知道您正在尝试访问该图像文件夹。我将尝试在您此时所在的文件夹中查找它