unemployment Posted March 22, 2011 Share Posted March 22, 2011 Why won't '../stuff.com' concatenate? <?php echo '<img src="', '../stuff.com'.getUserAvatar($post['username']), "\" class=\"avatar small\" title=\"${displayName}\" alt=\"${displayName}\" />"; ?> Quote Link to comment Share on other sites More sharing options...
requinix Posted March 22, 2011 Share Posted March 22, 2011 1. Did you copy and paste your code, or re-type it? 2. What is happening that makes you think it's behaving incorrectly? Quote Link to comment Share on other sites More sharing options...
Zurev Posted March 22, 2011 Share Posted March 22, 2011 1. Did you copy and paste your code, or re-type it? 2. What is happening that makes you think it's behaving incorrectly? For testings sake, try: <?php echo "<img src=\"../stuff.com".getUserAvatar($post['username'])."\" class=\"avatar small\" title=\"$displayName\" alt=\"$displayName\" />"; ?> Quote Link to comment Share on other sites More sharing options...
unemployment Posted March 22, 2011 Author Share Posted March 22, 2011 sorry guys. My mistake. It's concatenating I was just looking at the wrong line of code. Now id I could only get the path right. I am in the process of making an admin panel. Can you reference files in a subdirectory from you main directory? Quote Link to comment Share on other sites More sharing options...
unemployment Posted March 22, 2011 Author Share Posted March 22, 2011 I wanted to do this, but it fails... ../mysite.com/assets/img/avatars/defaultuser.jpg 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.