Php - echo - 为什么最后一个回声不起作用?

时间:2016-04-18 14:48:30

标签: php echo

为什么最后一个回声(<input value='Save Selections' type='submit'></form></body></html>")什么都没显示?

<?php
$pdf='aaa.pdf';
$image = new Imagick();
$image->pingImage($pdf);
$x = $image->getNumberImages();
echo "
<html><head>
<meta http-equiv='content-type' content='text/html; charset=UTF-8'>
<script type='text/javascript' src='//code.jquery.com/jquery-2.2.3.js'></script>

<style type='text/css'>
.bn {
    -webkit-filter: grayscale(100%);
    -moz-filter: grayscale(100%);
    -ms-filter: grayscale(100%);
    -o-filter: grayscale(100%);
    filter: grayscale(100%);
}
body {
    background: #000; 
}
img {
    padding: 5px;
    vertical-align: top;
}
label, input {
  vertical-align: top;
}
/* Uncomment this and the checkbox will be hidden,
   but it still exists and is sent when the form
   is submitted. */
/*
input[type=checkbox] {
    visibility: hidden;
}
*/
</style>

<title>pdf</title>
<script type='text/javascript'>
window.onload=function(){
$('input.imagepicker').change(function(e) {
    var imgLabel = $('label[for='+this.id+']');
    imgLabel.find('img').toggleClass('colore bn');
});}
</script>
</head>
<body>
  <form id='savepics' action='#' method='post'>
<!-- by making the image the label for the checkbox,
     clicking the image also toggles the checkbox state. -->";

for ($i=0; $i <= $x; ++$i){
	$im = new Imagick();
	$im->setResolution(20, 20);
	$im->readImage(''.$pdf.'['.$i.']');
	$im->setImageFormat('jpeg');
	$im->setImageCompression(imagick::COMPRESSION_JPEG); 
	$im->setImageCompressionQuality(100);
	$jpegpath = 'jpeg/'.$pdf.'['.$i.'].jpeg';
	$im->writeImage($jpegpath);
	echo "

<label for='page$i'><img id='pageimage$i'
  class='colore selectable'
  src='$jpegpath'
  alt='pag$i'/></label>
<input type='checkbox' name='page$i' id='page$i' class='imagepicker'></input>
";
}
   
echo "<input value='Save Selections' type='submit'></form></body></html>";
?>

0 个答案:

没有答案