|
Posted by jdbartlett on 08/20/07 19:42
On Aug 20, 1:41 pm, push...@gmail.com wrote:
> I'm trying to run the following php code along with gd library as a
> cron job ,but cron is not generating any output.
> When I run this code from my browser I get an image correctly.
> Somebody please tell me what needs to be done to get an image via cron
> job.
> <?php
> //Header("Content-type: image/png");
> $height = 300;
> $width = 300;
> $im = ImageCreate($width, $height);
> $bck = ImageColorAllocate($im, 10,110,100);
> $white = ImageColorAllocate($im, 255, 255, 255);
> ImageFill($im, 0, 0, $bck);
> ImageLine($im, 0, 0, $width, $height, $white);
>
> for($i=0;$i<=299;$i=$i+10) {
> ImageLine($im, 0, $i, $width, $height, $white); }
>
> ImagePNG($im,"x.png");
> ?>
Does the user with this cron job have permission to create/overwrite
the file "x.png"?
Navigation:
[Reply to this message]
|