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? Quote Link to comment 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.. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.