2013-03-30 24 views

回答

1

當然!

echo ' <a href="https://www.facebook.com/sharer.php?u=',$my_url,'"> 
<img src="'.$folder.'/facebook.png" width="50" alt=""></a> 
<a href="http://twitter.com/home?status=',$my_url,'"> <img 
src="'.$folder.'/twitter.png" width="50" alt=""></a> '; 

$文件夾是您的自定義圖標文件夾和$ my_url是您的網址

+0

並且在哪裏獲得份數? – Zeroic

+0

這使得他想要PHP代碼的假設。 – BrettJ

+0

他可以用字符串替換變量,而不使用echo命令(純html - 當然沒有撇號)。 –

0

到其他地方

function myshare($folder, $my_url){ 
return 
'<a href="http://www.facebook.com/sharer.php?u='.$my_url.'"><img src="'.$folder.'/facebook.png" width="50" alt=""></a> 
<a href="http://twitter.com/home?status='.$my_url.'"><img src="'.$folder.'/twitter.png" width="50" alt=""></a> 
<a href="https://plus.google.com/share?url='.$my_url.'" ><img src="'.$folder.'/google.png" width="50" alt=""></a> 
'; 
} 

echo myshare('myfoldername','myurl'); 
相關問題