steviez Posted July 10, 2008 Share Posted July 10, 2008 Hi, I need to show a image inline on a php page so im using the following code: <?php header('Content-Type: image/gif'); header('Content-Disposition: inline; filename=file_not_found.gif'); readfile("/home/image/public_html/images/file_not_found.gif"); ?> Even though the image is there and the image displays correctly im getting the following error: [09-Jul-2008 16:41:01] PHP Warning: readfile(/home/image/public_html/images/ewz8q9lvspdfevpc0k3.jpg) [<a href='function.readfile'>function.readfile</a>] Any ideas whats wrong? Thanks Link to comment https://forums.phpfreaks.com/topic/114010-solved-read-file-error/ Share on other sites More sharing options...
Third_Degree Posted July 10, 2008 Share Posted July 10, 2008 If your code does what you want it to do, simply use <?php header('Content-Type: image/gif'); header('Content-Disposition: inline; filename=file_not_found.gif'); @readfile("/home/image/public_html/images/file_not_found.gif"); ?> Link to comment https://forums.phpfreaks.com/topic/114010-solved-read-file-error/#findComment-585949 Share on other sites More sharing options...
steviez Posted July 10, 2008 Author Share Posted July 10, 2008 If your code does what you want it to do, simply use <?php header('Content-Type: image/gif'); header('Content-Disposition: inline; filename=file_not_found.gif'); @readfile("/home/image/public_html/images/file_not_found.gif"); ?> That seems to have worked thanks, what does the @ symble do at the beggining of php code? Link to comment https://forums.phpfreaks.com/topic/114010-solved-read-file-error/#findComment-585962 Share on other sites More sharing options...
Third_Degree Posted July 10, 2008 Share Posted July 10, 2008 it is an error suppressing operator For a good list of php operators and their uses look here (look under advanced for @) Link to comment https://forums.phpfreaks.com/topic/114010-solved-read-file-error/#findComment-585963 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.