NextGenForum.net Posted December 13, 2007 Share Posted December 13, 2007 Hi, I wanted to know how to php include a .gif image, when i do it like this <?php include (images/index_01.gif); ?> i get this error; Parse error: syntax error, unexpected '/' in /home/price7/public_html/index.php on line 46 Quote Link to comment Share on other sites More sharing options...
helraizer Posted December 13, 2007 Share Posted December 13, 2007 add single (or double) quotes to the location so <?php include ('images/index_01.gif'); ?> See if that works. Sam Quote Link to comment Share on other sites More sharing options...
PFMaBiSmAd Posted December 13, 2007 Share Posted December 13, 2007 Your parse error is because you need some quotes around the path/file to make it a string that the include() function expects. However, you cannot include an image on a web page. You can only put images on a web page using an <img src="url_of_the_image" alt=""> tag. Read this - http://w3schools.com/html/html_images.asp Quote Link to comment Share on other sites More sharing options...
NextGenForum.net Posted December 13, 2007 Author Share Posted December 13, 2007 I was told on another forum that i could use a cache (php include) to stop my sliced images from photoshop from loading aafter every click ??? Thanks Quote Link to comment Share on other sites More sharing options...
NextGenForum.net Posted December 14, 2007 Author Share Posted December 14, 2007 <img src="url_of_the_image" alt=""> Will this cache??? Thanks 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.