Welcome Guest, Not a member yet? Register   Sign In
Unable to load the requested file
#1

[eluser]elaniobro[/eluser]
I searched and read the few topics concerning this issue. None of them corrected my issue so I am posting a new thread.

Controller: rss.php
Code:
<?php
    class Rss extends Controller
    {
        function Rss()
        {
            parent::Controller();
        }

        function index()
        {
            $this->load->helper('xml');
            $data['query'] = $this->db->get('thoughts');
            $data['title'] = 'Example | Thoughts';
            $data['creator'] = '[email protected]';
            $data['link'] = 'http://www.example.com/thoughts';
            
            $this->load->view('rss', $data);
        }
    
    }
?>

view: rss_view.php
Code:
<?php # echo'<?xml version="1.0" encoding="utf-8"?>';?>
<rss version="2.0"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
    xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
    xmlns:admin="http://webns.net/mvcb/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:content="http://purl.org/rss/1.0/modules/content/">

    <channel>
    
    &lt;title&gt;&lt;?= $data->'title'?&gt;&lt;/title&gt;
    &lt;link&gt;&lt;?= $data->'link';?&gt;&lt;/link&gt;
    <description>&lt;?php # $page_description; ?&gt;</description>
    <dc:language>&lt;?php #  $page_language; ?&gt;</dc:language>
    <dc:creator>&lt;?= $data->'email';?&gt;m</dc:creator>
    <dc:rights>Copyright &lt;?php #  gmdate("%Y", time()); ?&gt;</dc:rights>
    <dc:date>&lt;?php #gmdate("%Y-%m-&#xd;T;%H:%i:%s%Q" time()); ?&gt;</dc:date>
    <admin:generatorAgent rdf:resource="http://www.codeigniter.com/" />

    &lt;?php foreach($data as $row): ?&gt;
    
        <item>
          &lt;title&gt;&lt;?= xml_convert($row->title); ?&gt;&lt;/title&gt;
          &lt;link&gt;&lt;?php #  $row->permalink; ?&gt;&lt;/link&gt;
          <guid>&lt;?php #  $row->permalink; ?&gt;#When:&lt;?= gmdate("%H:%i:&#xsZ;", $row->date); ?&gt;</guid>
          <description>&lt;?php #  xml_convert($row->description); ?&gt;</description>
          <dc:subject>&lt;?= xml_convert($row->tag); ?&gt;</dc:subject>
          <dc:date>&lt;?php #  gmdate"%Y-%m-&#xd;T;%H:%i:%s%Q", $row->date); ?&gt;</dc:date>
        </item>
        
    &lt;?php endforeach; ?&gt;
    
    </channel>
</rss>

any ideas?
#2

[eluser]elaniobro[/eluser]
I'm an idiot, please delete this thread. I was not loading the view properly Tongue




Theme © iAndrew 2016 - Forum software by © MyBB