html2canvas with Proxy


html2canvas with Proxy

我有一个页面,使用http://html2canvas.hertzen.com/复制div中的图像。这工作得很好。当我将外部图像加载到添加代理的div中时,这不起作用。在我的代码中,我只是添加了"proxy: "/two2/php/proxy.php",":

$('.Canvas').html2canvas({
    //logging:true,
    proxy: "/two2/php/proxy.php",
    onrendered: function (canvas) {

然后上传php https://github.com/brcontainer/html2canvas-php-proxy/blob/master/html2canvasproxy.php到文件夹"/two2/php/"

我还需要做些什么才能让它工作吗?

谢谢。

在PHP中,我增加了TIMEOUT,我应该减少TIMEOUT。这是

define('TIMEOUT', 30);//Timeout from load Socket

我改成

define('TIMEOUT', 10);//Timeout from load Socket

现在可以工作了