php
  • html
  • 2010-09-14 423 views 0 likes 
    0

    對於以下鏈接,我希望$ link1出現在底部作爲錨文本「評論鏈接」作爲超鏈接。相反,整個鏈接顯示在底部。僅顯示超鏈接文字而不顯示整個鏈接網址

    我怎麼能這樣做只有「評論鏈接」顯示?

    由於提前,

    約翰

    $link1 = "<a href='http://www.domain.com/path/comments/index.php?submission=".urlencode($submission)."&submissionid=".urlencode($submissionid)."&url=".urlencode($url)."&countcomments=".urlencode($countcomments)."&submittor=".urlencode($submittor)."&submissiondate=".urlencode($submissiondate)."&dispurl=".urlencode($dispurl).">Comment Link</a>"; 
    
        $message1 = " 
    Someone made the following comment on your submission $submission: 
    
    $comment 
    
    
    Please click the link below to see the comment in context. 
    
    $link1 
    
    
    "; 
    

    回答

    1

    缺少右'在你的錨的href屬性的末尾。

    +0

    應該是一個評論。 – 2010-09-14 17:04:17

    +0

    這不是對他提出的代碼的評論。這是他看到完整URL的原因。 Firefox等修正了HTML,IE沒有。 – Mike 2010-09-14 17:14:54

    +0

    我不認爲它應該是一個評論。他清楚地解決了這個問題。 – 2010-09-15 12:53:40

    相關問題