Iryk Posted March 25, 2006 Share Posted March 25, 2006 [code]<?require_once("db_connect.php");$query = mysql_query("SELECT * FROM site");$result = mysql_fetch_array($query);$image_1 = $result['banner'];$image_2 = imagecreatefrompng("$image_1");imagepng(".$image_2.");?>[/code]That is my code. And this is the error I get on the page:Warning: imagecreatefrompng(None Yet): failed to open stream: No such file or directory in /home/magneo/public_html/banner.php on line 6Warning: imagepng(): supplied argument is not a valid Image resource in /home/magneo/public_html/banner.php on line 7Could some one please tell me what I am doing wrong? Link to comment https://forums.phpfreaks.com/topic/5746-image-include-script/ Share on other sites More sharing options...
shocker-z Posted March 25, 2006 Share Posted March 25, 2006 [!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]<?require_once("db_connect.php");$query = mysql_query("SELECT * FROM site");$result = mysql_fetch_array($query);$image_1 = $result['banner'];$image_2 = imagecreatefrompng("$image_1");imagepng("$image_2");?>[/quote]You put . before and afte rthe variable name inside a string so it would look like your trying to echo the .'s as part of the vpng to display therefore totaly corupting it.. Link to comment https://forums.phpfreaks.com/topic/5746-image-include-script/#findComment-20494 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.