douling0053 2015-05-05 06:37
浏览 26
已采纳

Twitter卡不能使用PHP脚本?

Update

<?PHP
    $Title = "This is the Open Grah script";
    $Description = "This is the one and only Description, or better yeh the first 150 charecters of the main content on your page. What ever you feel like really!";
    $Twitter = "@obama";

     echo "<html>
            <head>
             <title> $Title </title>";
     echo '<meta name="description" content=" ';
     echo $Description;
     echo '" />';

     echo "<meta name="twitter:card" content="summary" />";  
     echo '<meta name="twitter:site" content"';
     echo $Twitter
     echo '"/>';
     echo '<meta name="twitter:title" content"';
     echo $Title;
     echo '" />';
     echo '<meta name="twitter:description" content" ';
     echo $Description;
     echo '" />';

    ?>

Following up on my last question, my page won't load at all anymore, I'm sorry if you feel like im wasting peoples time. It is probably just a typo.

  • 写回答

1条回答 默认 最新

  • dsyo9700 2015-05-05 06:39
    关注
     echo "<meta name='twitter:card' content='summary' />";  
    

    You need to make sure that you're not using " inside the string that you start with ". You should either use ' or \" inside your string starting with ".

    Two lines after that you're missing ;.

    echo $Twitter;
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
编辑
预览

报告相同问题?

手机看
程序员都在用的中文IT技术交流社区

程序员都在用的中文IT技术交流社区

专业的中文 IT 技术社区,与千万技术人共成长

专业的中文 IT 技术社区,与千万技术人共成长

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

客服 返回
顶部