質問

Warning: include(C:\xampp\htdocs\magento\includes\src\Magentotutorial_Weblog_Model_Blogpost.php): failed to open stream: No such file or directory in C:\xampp\htdocs\magento\includes\src\Varien_Autoload.php on line 93


config.xml

<?xml version="1.0"?>
<config>
    <modules>
        <Magentotutorial_Weblog>
            <version>1.6.0.4</version>
        </Magentotutorial_Weblog>
    </modules>

    <global>
     <models>
        <weblog>
            <class>Magentotutorial_Weblog_Model</class>
            <resourceModel>weblog_resource</resourceModel>
        </weblog>
     </models>
    </global> 

    <frontend>
      <routers>
          <weblog>
            <use>standard</use>
               <args>
                  <module>Magentotutorial_Weblog</module>
                  <frontName>weblog</frontName>
               </args>
          </weblog>
      </routers>
    </frontend> 
</config>

Controllers: IndexControllers

<?php 
class Magentotutorial_Weblog_IndexController extends Mage_Core_Controller_Front_Action {
    public function testModelAction() {
        $blogpost = Mage::getModel('weblog/blogpost');
        echo get_class($blogpost);
    }
} 
?>

I have also create the Model file named BlogPost. Please find the code as below.

<?php 
class Magentotutorial_Weblog_Model_Blogpost extends Mage_Core_Model_Abstract
{
    protected function _construct()
    {
        $this->_init('weblog/blogpost');
    }
} 
?>
役に立ちましたか?

解決

Please disable compilation from admin using following step,

sytem->tools->compilation
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top