在Joomla项目中工作时出现PHP偏移错误
问题描述:
我的代码:
My Code:
// SlideShow Content - Loop
for ( $i=0 ; $i < count($this->image) ; $i++ ) {
// Preparing Titles
$this->alt[$i] = $this->title[$i] ? ' alt="'. $this->title[$i] .'"' : '';
$this->alttitle[$i] = $this->title[$i] ? ' title="'. $this->title[$i] .'"' : '';
// Preparing Links
$this->imagelinkstart[$i] = $this->linked ? '<a href="'. $this->url[$i] .'" target="'. $this->target .'">' : '<a href="java<!-- no -->script:void(0);">';
$this->imagelinkend = '<\/a>';
// Show Only Entered Images
if (!$this->showallimages) {
// External Image Resource
if (strstr($this->image[$i],'<ext>')) {
$this->image[$i] = str_replace('<ext>','',$this->image[$i]);
$this->imagewithpath[$i] = '<img src="'. $this->image[$i] . '" border="0" style="'.$this->imagewidth . $this->imageheight.'"'. $this->alt[$i] . $this->alttitle[$i] .'\/>';
}
// Internal Image Resource
else $this->imagewithpath[$i] = '<img src="'.JURI::root() . $this->folder . '/' . $this->image[$i] . '" border="0" style="'.$this->imagewidth . $this->imageheight.'"'. $this->alt[$i] . $this->alttitle[$i] .'\/>';
}
// Show All Images in the folder
else $this->imagewithpath[$i] = '<img src="'.JURI::root() . $this->image[$i] . '" border="0" style="'.$this->imagewidth . $this->imageheight.'"'. $this->alt[$i] . $this->alttitle[$i] .'\/>';
// Prepared SlideShow (Content) Image:
$this->slideshowcontent[$i] = $this->showallimages ? $this->imagelinkstart[$i].$this->imagewithpath[$i].$this->imagelinkend : $this->imagelinkstart[$i].$this->imagewithpath[$i].$this->imagelinkend;
}
错误消息:
Error Message:
Notice: Undefined offset: 1 in C:\xampp\htdocs\joomlaadmin\modules\mod_slideshow\helper.php on line 78
Notice: Undefined offset: 1 in C:\xampp\htdocs\joomlaadmin\modules\mod_slideshow\helper.php on line 79
Notice: Undefined offset: 2 in C:\xampp\htdocs\joomlaadmin\modules\mod_slideshow\helper.php on line 78
Notice: Undefined offset: 2 in C:\xampp\htdocs\joomlaadmin\modules\mod_slideshow\helper.php on line 79
Notice: Undefined offset: 3 in C:\xampp\htdocs\joomlaadmin\modules\mod_slideshow\helper.php on line 78
Notice: Undefined offset: 3 in C:\xampp\htdocs\joomlaadmin\modules\mod_slideshow\helper.php on line 79
Notice: Undefined offset: 4 in C:\xampp\htdocs\joomlaadmin\modules\mod_slideshow\helper.php on line 78
Notice: Undefined offset: 4 in C:\xampp\htdocs\joomlaadmin\modules\mod_slideshow\helper.php on line 79
Notice: Undefined offset: 5 in C:\xampp\htdocs\joomlaadmin\modules\mod_slideshow\helper.php on line 78
Notice: Undefined offset: 5 in C:\xampp\htdocs\joomlaadmin\modules\mod_slideshow\helper.php on line 79
Notice: Undefined offset: 6 in C:\xampp\htdocs\joomlaadmin\modules\mod_slideshow\helper.php on line 78
Notice: Undefined offset: 6 in C:\xampp\htdocs\joomlaadmin\modules\mod_slideshow\helper.php on line 79
Notice: Undefined offset: 7 in C:\xampp\htdocs\joomlaadmin\modules\mod_slideshow\helper.php on line 78
Notice: Undefined offset: 7 in C:\xampp\htdocs\joomlaadmin\modules\mod_slideshow\helper.php on line 79
请帮帮我。
Please help me.
答
i = 0;
i=0 ;
i < count(
i < count(
this-> image);
this->image) ;