Buddski Posted December 10, 2009 Share Posted December 10, 2009 Im not sure what you mean by "if i browse through my main code and see the img tag and click on it"? Ive stripped back your code and uploaded it to my server and its all working how it should be.. http://buddski.com/test/main.php Link to comment https://forums.phpfreaks.com/topic/184649-resizing-images-from-db/page/2/#findComment-974931 Share on other sites More sharing options...
ROCKINDANO Posted December 10, 2009 Author Share Posted December 10, 2009 this is my source code <img src="images/resize_image.php?file=Official flyernail.jpg" border="1" class="floatright" title="Official flyernail.jpg" alt="Official flyernail.jpg" /> shouldn't the src path be something like: images/official flyernail.jpg instead of images/resize_image.php?file=Official flyernail.jpg Link to comment https://forums.phpfreaks.com/topic/184649-resizing-images-from-db/page/2/#findComment-974933 Share on other sites More sharing options...
Buddski Posted December 10, 2009 Share Posted December 10, 2009 Your source is correct.. There is something amiss in your resizing script.. have you tried going to http://localhost/[location of your script]/images/resize_image.php?file=Official flyernail.jpg and see what it says, if anything.. Link to comment https://forums.phpfreaks.com/topic/184649-resizing-images-from-db/page/2/#findComment-974939 Share on other sites More sharing options...
ROCKINDANO Posted December 10, 2009 Author Share Posted December 10, 2009 this is what i get: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>404 Not Found</title> </head><body> <h1>Not Found</h1> <p>The requested URL /images/resize_image.php was not found on this server.</p> </body></html> Link to comment https://forums.phpfreaks.com/topic/184649-resizing-images-from-db/page/2/#findComment-974942 Share on other sites More sharing options...
ROCKINDANO Posted December 10, 2009 Author Share Posted December 10, 2009 and if i type it in the address bar it gives me a blank page localhost/resize_image.php/images/resize_image.php?file=Official flyernail.jpg this is what i typed in the addr bar Link to comment https://forums.phpfreaks.com/topic/184649-resizing-images-from-db/page/2/#findComment-974945 Share on other sites More sharing options...
Buddski Posted December 10, 2009 Share Posted December 10, 2009 Are your files directly in your root directory (htdocs or www folder)? root (Folder) |_ images (folder) |_ resize_image.php |_ Official flynail.jpg |_ main.php if thats the case you need to just navigate to http://localhost/images/resize_image.php?file=Official flynail.jpg if they are in a folder call news or something goto http://localhost/news/images/resize_image.php?file=Official flyname.jpg Link to comment https://forums.phpfreaks.com/topic/184649-resizing-images-from-db/page/2/#findComment-974948 Share on other sites More sharing options...
ROCKINDANO Posted December 10, 2009 Author Share Posted December 10, 2009 this is how my files are root(folder) |_images(folder) |_official flyernail.jpg |_resize_image.php |_mail.php Link to comment https://forums.phpfreaks.com/topic/184649-resizing-images-from-db/page/2/#findComment-974978 Share on other sites More sharing options...
ROCKINDANO Posted December 10, 2009 Author Share Posted December 10, 2009 could it be that i need a setting in my php.ini file or any libs? Link to comment https://forums.phpfreaks.com/topic/184649-resizing-images-from-db/page/2/#findComment-975000 Share on other sites More sharing options...
Buddski Posted December 10, 2009 Share Posted December 10, 2009 move resize_image.php into the images directory.. Link to comment https://forums.phpfreaks.com/topic/184649-resizing-images-from-db/page/2/#findComment-975093 Share on other sites More sharing options...
TeddyKiller Posted March 11, 2010 Share Posted March 11, 2010 As stated this code is used print '<img src="images/resize_image.php?file='.$pic.'" title="" border="0" width="170" height="135" class="floatright" style="margin-left: 5px; border: 2px solid #CCCCCC; padding: 3px; background: #9bbdfd;" />'; Would all this code still work if I used.. echo '<img src="images/resize_image.php?file='.$pic.'" title="" border="0" />'; Link to comment https://forums.phpfreaks.com/topic/184649-resizing-images-from-db/page/2/#findComment-1024748 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.