我正在为摄影师建立一个网站,我使用 iframe 将不同的图片作为长条图片包含到网站中。这在 chrome safari en firefox 中运行良好,但在 Internet Explorer 中似乎不起作用? 这是我使用 iframe 的文件
<?php
include 'core/init.php';
include 'includes/overall/overalheader.php';
include 'includes/aside.php';
if (isset($_GET['id']) === true && empty($_GET['id']) === false) {
$_SESSION['serie_id'] = $_GET['id'];
$lengte = lengte_frame($_SESSION['serie_id']);
?>
<iframe src="includes/fotos.php" frameborder="0" height="520px" width="<?php echo $lengte; ?>px"></iframe>
<?php
}
else {
echo 'hallee dermee';
}
include 'includes/overall/overalfooter.php';?>
这是 fotos.php 文件
<?php
include '../core/init.php';
$tekst = get_tekst($_SESSION['serie_id']);
$fotos = get_fotos($_SESSION['serie_id']);
?>
<div width="135" style="float:left; padding-left:15; border:1; max-width:200"></div>
<?php
$count = 0;
foreach ($fotos as $foto) {
if ($count == 0) {
$breed = 160;
} else {
$breed = 15;
}
echo '<div style="float:left; padding-left:' . $breed . '" width="' . $foto['width'] . '"><img src="../' . $foto['path'] . '" height="' . $foto['height'] . '" width="' . $foto['width'] . '"></div>';
$count++;
}
if (empty($tekst) === false) {
echo '<table style="float:left; padding-left:15;" width="200"><tr><td valign="top"><font face="Courier New, Courier, monospace" color="#777777" size="2px">' . $tekst . '</font><td><tr></table>';
}
?>