"Warning: imagepng(): Unable to open 'a.png' for writing in /www/htdocs/random.php on line 20"
This is my PHP Code
Code: Select all
code
<?php
$img_number = imagecreate(100,50);
$white = imagecolorallocate($img_number,255,255,255);
$black = imagecolorallocate($img_number,0,0,0);
$grey_shade = imagecolorallocate($img_number,204,204,204);
imagefill($img_number,0,0,$grey_shade);
ImageRectangle($img_number,1000,500,95,44,$black);
ImageRectangle($img_number,1000,500,99,99,$black);
$number = "Sensor1";
imagePNG($img_number,"a.png");
?>Code: Select all
Can you guide me what am I doing wrong here
I tried "/home/anmol/a.png" also but same error.
Sincerely,
Anmol Misra