Jump to content
php.lv forumi
Sign in to follow this  
gkazhus

Bildes attelosana

Recommended Posts

Taatad meeginu izveidot lai man bildes nosaukums buutu taads pats kaa virsraksts - item-title bet taa vietaa es sanjemu shaadu izvadu:

 

<img src="/uploads/Egles" ciekurs.jpg"="" class="image" alt="" style="background-color: rgb(245, 111, 20); width: 160px; height: 160px; display: block;" data-lazy-loaded="true">

 

Kaa lai es sho - Egles" ciekurs.jpg parversu Egles ciekurs.jpg

 

Kods:

$image='<img src="/uploads/'.$arr['item-title'].'.jpg" class="image" alt="" style="'.$image_style.$item_style.' width: '.$w.'px; height: '.$h.'px;" />';

Share this post


Link to post
Share on other sites

Uploadojot uztaisi bildei normālu un droši faila nosaukumu, oriģinālo vari tikai zināšanai pieglabāt. Un, kad izvadi title, tad dari to ar htmlspecialchars.

Share this post


Link to post
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...
Sign in to follow this  

×
×
  • Create New...