Jump to content
php.lv forumi

ja neiksiste !


suport

Recommended Posts

echo "<img src='forums/uploads/$bilde' alt='' width='100' height='100'>";
}
else
{
echo "<img src='http://kkas/no_avatar.gif' alt='' width='100' height='100'>";
} 

 

 

straa tikaj

echo "<img src='forums/uploads/$bilde' alt='' width='100' height='100'>";

 

so vienu ieliek ..

 

bet man vajag ta lai ja nav avatara tad radas noavatar bilde !

Edited by suport
Link to comment
Share on other sites

a ne tomer neaizgaja gan ..

 

if (file_exists($bilde)) {
echo "$bilde = ($avatar2['avatar_location']);
<img src='forums/uploads/$bilde' alt='' width='100' height='100'>";
} else {
echo "<img src='http://.../no_avatar.gif' alt='' width='100' height='100'>";
}

 

radas tikaj no_avatar

Link to comment
Share on other sites

a ne tomer neaizgaja gan ..

 

if (file_exists($bilde)) {
echo "$bilde = ($avatar2['avatar_location']);
<img src='forums/uploads/$bilde' alt='' width='100' height='100'>";
} else {
echo "<img src='http://.../no_avatar.gif' alt='' width='100' height='100'>";
}

 

radas tikaj no_avatar

 

Varbūt norādi bildei pareizo ceļu?

 

forums/upload/$bilde?

Link to comment
Share on other sites

http://paste.php.lv/413fb56bfe255fcd4fadf48ae888e37a?lang=php

 

reku vis sakums .. varbut tur ir kada kluuda ?

 

 

nu ir kapec tad man ja es nelieku to fileexist izvelk ? echo "<img src='/forums/uploads/$bilde' alt='' width='100' height='100'>"; ar sho .. bet kad pieliek klat if ..} else { ... tad nejiet ! rada tikaj no avatar ! bildi !

Link to comment
Share on other sites

echo (file_exists('forums/uploads/'.$bilde) ? '<img src="/forums/uploads/'.$bilde.'" alt="" width="100" height="100" />' : '<img src="/no_avatar.gif" alt="" width="100" height="100" />');

 

P.S. Pamēģini norādīt pilno ceļu uz failu iekš file_exists funkcijas! (/var/www/tavs_webs/blablabla/forums/uploads/.....)

Edited by Pentiums
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...