1
我嘗試使用Snappy
(http://www.codediesel.com/downloads/snappy SRC)的URL獲取網站形象的Windows 7上獲得來自URL每次我從
error: The image cannot be display as it contains errors
代碼時間的圖像,但:
<?php
require_once('Snappy/Media.php');
require_once('Snappy/Image.php');
/* 'wkhtmltoimage' executable is located in the current directory */
$snap = new Image('C://"Program Files"/wkhtmltopdf/wkhtmltopdf.exe');
/* Displays the bbc.com website index page screen-shot in the browser */
header("Content-Type: image/jpeg");
$snap->output('http://www.bbc.com bbc.jpg');
?>
運行,無需將影像/ JPEG頭的代碼(「內容類型:..」)設置,看看你得到任何合理的錯誤消息在您的輸出中。 – MatsLindh