致命错误:第59行的C:\ Program Files \ EasyPHP-12.1 \ www \ simplepie \ library \ SimplePie.php中找不到类'SimplePie_Misc'

时间:2013-09-20 08:47:05

标签: php rss simplepie

我开始使用simplepie for RSS,我在第一阶段就遇到了这个错误。

致命错误:第59行的C:\ Program Files \ EasyPHP-12.1 \ www \ simplepie \ library \ SimplePie.php中找不到类'SimplePie_Misc'

修改 主文件夹名为'simplepie' 子文件夹和文件是

  1. 构建
  2. 缓存
  3. compatibilty_test
  4. CSS
  5. IDN
  6. 包括
  7. library(包含SimplePie.php和名为SimplePie的文件夹)
  8. 测试
  9. 的index.php
  10. 这是代码

    <?php  
    
    //Load simplepie library  
    require_once 'includes/autoloader.php';  
    
    //new simplepie
    $feed = new SimplePie();  
    
    //address of multiple feeds
    $feed->set_feed_url(array(
    'http://crazyanagh.blogspot.com/feeds/posts/default'
    ));  
    
    //enabling cache
    $feed->enable->cache(true);
    $feed->set_cache_location('cache');
    $feed->set_cache_duration(1800);
    
    //start the process
    $feed->init();  
    
    //handle all types(RSS, Atoms)
    $feed->handle_content_type();
    
    ?>  
    
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">  
    <html xmlns="http://www.w3.org/1999/xhtml">  
    <head>  
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />  
        <link rel="stylesheet" href="css/default.css" />  
        <title>RSS Thing!</title>  
    </head>  
    
    <body>  
    
        <div id="container">
            <h1> SimplePie RSS Thing</h1>  
        </div><!--end container-->  
    
    </body>  
    

1 个答案:

答案 0 :(得分:-2)

你在缓存第一行中犯了一个错误。应该是 enable_cache