Re: Image problem

From: Date: Sat, 20 Jan 2001 09:22:21 +0000
Subject: Re: Image problem
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-35791@lists.php.net to get a copy of this message
> Can anyone tell me how to display both jpg and gif images. Basically, > what i've got is: > <img src="$filedir/$CUserName".jpg> > > Now, I know I probably need slashes in there and I played around with it > but no luck. Where do I put them? TIP: Use "View Source" in your browser to see what the IMG tag looks like. I suspect you've forgotten that you're not in PHP mode, and are just sending a very oddly-named image tag, literally: "$filedir/$CUserName" Since the quotes are going there, I guess HTML is going to ignore the .jpg part, or treat it as an unkown attribute. I'm guessing you want: <img src="<?php echo $filedir, '/', $CUserName, '.jpg';?>">

« previous php.general (#35791) next »