windukku Posted October 7, 2012 Share Posted October 7, 2012 Hello, i've been having a bit of trouble lately whilst working on a new site. I'm completely newbie with this so please bare with me.. I've been trying to upload 'Precocious.jpg' (168kb, 700x900) using PHP echo, but all that appears is a broken image.However i've tried uploading another image 'illustrations.jpg (28kb, 202x182), and it uploads fine. <?php if ($cmd[0]=="twitbrief"):?><section class="list twitbrief0"> <img src="<?php echo "{$site}images/"; ?>Precocious.jpg" /> </section><?php endif;?> <img src="<?php echo "{$site}images/"; ?>illustrations.jpg" /> I can provide more information if needed...thanks Link to comment Share on other sites More sharing options...
Ingolme Posted October 7, 2012 Share Posted October 7, 2012 echo does not upload files, all it does is send strings to the client.I see no uploading code here. If the file "Precocious.jpg" is not already on the server then the image will not appear on the page. Link to comment Share on other sites More sharing options...
windukku Posted October 7, 2012 Author Share Posted October 7, 2012 Sorry i didn't mean upload, i meant just to show on the web page. Link to comment Share on other sites More sharing options...
niche Posted October 7, 2012 Share Posted October 7, 2012 (edited) Please consider Filezilla http://filezilla-project.org/ if you have a web server else please insure your image is in the right folder. Also, "{$site}images/" is ambiguous. Edited October 7, 2012 by niche Link to comment Share on other sites More sharing options...
windukku Posted October 7, 2012 Author Share Posted October 7, 2012 Ahh okay thanks, i've fixed the problem. I'm currently working on WAMP, and forgot to upload the image to the filezilla server. Link to comment Share on other sites More sharing options...
niche Posted October 7, 2012 Share Posted October 7, 2012 That happens. Please also note that img names are case sensitive on some servers. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now