|
|
@@ -39,21 +39,8 @@ class TestController extends BaseController
|
|
|
$ip = $_SERVER['SERVER_ADDR'] ?? '';
|
|
|
echo $ip;
|
|
|
|
|
|
- $converter = new ImageConverter(null, [
|
|
|
- "fmt" => "png",
|
|
|
- "in" => "http://www.baidu.com",
|
|
|
- "out" => "test.png"
|
|
|
- ]);
|
|
|
-
|
|
|
- var_dump($converter);
|
|
|
-
|
|
|
-// $str = "<div style='color:red;font-weight:bold;'>aaa</div>";
|
|
|
-// $converter = new ImageConverter($str, [
|
|
|
-// "fmt" => "jpg",
|
|
|
-// "out" => "test.jpg"
|
|
|
-// ]);
|
|
|
-
|
|
|
- //$converter->convert();
|
|
|
+ wkhtmltox_convert('image',
|
|
|
+ array('out' => '/tmp/test.jpg', 'in' => 'http://www.baidu.com/'));
|
|
|
|
|
|
}
|
|
|
|