2015-05-20 178 views
-1

在我的所有博客文章的底部我得到这样的评论:解析错误:语法错误行39

评论

解析错误:语法错误,意外的文件结束在/ home/nildcan /的public_html /可湿性粉剂内容/主题/记性/上线的comments.php 39

(可在现场这里查看:http://www.nildcanada.org/courses/#comments

我相信这是最后一行,这是问题,但我不知道什么是错误。这里是行39/40:

 <div class="commenttext"> <?php if(function_exists('get_avatar')) { echo get_avatar($comment, '56', $default = '<http://www.nildcanada.org/wp-content/themes/memorability/images/davatar.jpg>'); } ?> 
     <?php comment_text() ?> 

任何人都可以帮忙吗?

回答

0

您直接在函数中定义一个变量,这是行不通的。试试这个:

<div class="commenttext"> 

<?php 
    if(function_exists('get_avatar')) { 
     $default = 'http://www.nildcanada.org/wp-content/themes/memorability/images/davatar.jpg'; 
     echo get_avatar($comment, '56', $default); 
    } 
?> 

<?php comment_text(); ?>