开发者

Codeigniter Trackback Question

I am try开发者_如何学Going to use the trackback library in codeigniter, but I am always get this

An unknown error was encountered

The following is my code(controller). There is other code validating the form etc but not effecting the trackback

    $id = $this->input->post('id');
    $ping_url = $this->input->post('ping_url');
    $title = $this->input->post('title');
    $entry = $this->input->post('entry');
    $url = "http://shivabeach.com/journal/journal_view/$id";
    if (isset($ping_url)) {
        $tb_data = array('ping_url' => $ping_url, 'url' => $url, 'title' => $title,
            'excerpt' => $entry, 'blog_name' => 'Shivabeach', 'charset' => 'utf-8');

        if (!$this->trackback->send($tb_data)) {
            echo $this->trackback->display_errors();
        } else {
            echo 'Trackback was sent!';
        }

    }

I get my trackbacks from the site I am pinging, all data come from a form that works perfectly without the trackback. I use Isset($ping_url because the backtrack field may be empty at times. I also have the trackback library autoloading

Any thoughts?

edit. I have managed to get rid of the "A PHP Error was encountered" part, now i just get the unknown error. I had a field named "class"


Do you have error reporting on (for CodeIgniter) and have it set to report all events? It looks like a CI error and the log may provide some clue as to what's going on.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜