Re: imagesx(): supplied argument is not a valid Image resource (CODE)
| From: | John Nichel | Date: | Tue, 30 Nov 2004 19:17:35 +0000 |
| Subject: | Re: imagesx(): supplied argument is not a valid Image resource (CODE) | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-203170@lists.php.net to get a copy of this message | ||
Robert Sossomon wrote:
<snip>
// this is the path of your files folder. Change 'pathofile' $dir = "images/";I would make this the path from root, ie... $dir = "/root/path/images/"; <snip>
// takes the objects in the array and randomizes them $arrayobj = array_rand($array); $random = $array[$arrayobj]; // this creates the path name to the random file // $path becomes the path name (duh) for the file $path = $dir . $random; $width = imagesx($random)/4; $height = imagesy($random)/4;You need to supply the path to the image...I'm betting you wanted to do... $width = imagesx($path)/4; $height = imagesy($path)/4; -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 john@kegworks.com