-1
public function main($content, array $conf) {
$this->conf = $conf;
$this->pi_setPiVarDefaults();
$this->pi_loadLL();
$content = '';
$background_image = $this->cObj->parentRecord['data']['media'];
// Wenn ein Bild vorhanden ist
if ($background_image != '') {
$content .= '<img src="uploads/media/'.$background_image.'" alt="" title="" width="100%" />';
}
return $this->pi_wrapInBaseClass($content);
}
当预期的HTML我得到的路径是这样的:PHP 1显示,而不是图像
<img src="uploads/media/1" alt="" title="" width="100%">
这不是我写的所以这就是为什么它是理解为什么它的行为方式,确实。欣赏任何提示。
'的print_r($ background_image)' –
入门1印刷这使我想到的问题是: $ background_image = $此 - > cObj-> parentRecord [ '数据'] [ '媒体']; –
哪个TYPO3版本? –