Hi, I'm trying to write a small graphic editor and I use HTML5, a JS library called fabricjs ( http://fabricjs.com/demos/ ). I've put the sequence upon 2 different servers: the first one is working perfectly: http://www.coalize.it/accordion.html
On the second server, the last pass, after having written a text, shows the image without ant text on it: apparently the original image.
Should be noted that on the server the stored image is the one with text on it!
The image is passed to the page in a $_POST, in base64 format, via the previous form. The PHP executed at page loading is the following:
<?php unlink("transit/" . $_POST["trans_file"]); $filename = explode(".", $_POST["trans_file"]); $filesave = $filename . ".png"; $data = $_POST["base64img_data"]; $data = explode(";", $data); $data = explode(",", $data); $imagine=base64_decode(chunk_split($data)); $handle = fopen("transit/$filesave", "wb"); fwrite($handle, $imagine); fclose($handle); ?>
This code is the same I use passing from the canvas with the image, to the page making the text: the canvas plus image is transformed in PNG, used as a background for the canvas, then the text part is executed.
I cannot really image why the execution is different from the two servers!