為啥我輸出的網頁背景是黑色?
代碼和老師一樣啊
<?php
$image = imagecreatetruecolor( 100,30 );
$bgcolor = imagecolorallocate($image,255,255,255);
imagefill($image,0,0,$bgcolor);
header( 'content-type:image/png' );
imagepng( $image );
//end
imagedestroy( $image );
代碼和老師一樣啊
<?php
$image = imagecreatetruecolor( 100,30 );
$bgcolor = imagecolorallocate($image,255,255,255);
imagefill($image,0,0,$bgcolor);
header( 'content-type:image/png' );
imagepng( $image );
//end
imagedestroy( $image );
2017-04-26
舉報
2017-05-03
換個瀏覽器試試
2017-04-27
你這里寫的沒錯啊,運行是白色的