Jump to content

Help with echo {$site}


windukku

Recommended Posts

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

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

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 by niche
Link to comment
Share on other sites

That happens. Please also note that img names are case sensitive on some servers.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...