<?php
header('Content-Type: image/png');
$im = @imagecreate(100, 100);
$color = imagecolorallocate($im, 10,10,10);
imagefill($im, 50, 50, $color);
imagePNG($im);
imagedestroy($im);
?>
this code works but if I put there require_once
require_once('file.php');
it doesn't work why?
I had some problem yesterday. I resolved erasing all spaces from all rows of included file. Last row without CR/LF I hope this is useful
created a page "file.php" that contain only just phpinfo() and call it via "require_once('file.php');"...
look like your png is not being treated as png and not being render or being destroy image here
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.