Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/268.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 找到Magento 404页,未调用块_Php_Magento - Fatal编程技术网

Php 找到Magento 404页,未调用块

Php 找到Magento 404页,未调用块,php,magento,Php,Magento,我已经在控制器中创建了一个带有2个函数的自定义模块,一个用于索引页面,另一个用于成功页面。我可以访问索引页面,但当我在url中进入成功页面时,它会显示404Found。我不知道我在哪里犯了错误 我的模块名为instagram..我的控制器代码: app/code/local/Blazedream/Instagram/controllers/IndexController.php <?php class Blazedream_Instagram_IndexControlle

我已经在控制器中创建了一个带有2个函数的自定义模块,一个用于索引页面,另一个用于成功页面。我可以访问索引页面,但当我在url中进入成功页面时,它会显示404Found。我不知道我在哪里犯了错误

我的模块名为instagram..我的控制器代码:

   app/code/local/Blazedream/Instagram/controllers/IndexController.php
   <?php

  class Blazedream_Instagram_IndexController extends Mage_Core_Controller_Front_Action
  {
 public function indexAction() {

    $this->loadLayout();
    $this->getLayout()->getBlock('login.instagram');

    //print_r($this->getLayout()->getBlock('footer.topvendors'));die;

    $this->renderLayout();


}
public function successAction() {
    echo "hello hello"; die;
    $this->loadLayout();
    $this->getLayout()->getBlock('login.success');

    //print_r($this->getLayout()->getBlock('footer.topvendors'));die;

    $this->renderLayout();


}
}
访问控制器中成功功能的我的url:

       http://192.168.1.188/projects/shopu_v2/trunk/shopu/index.php/instagram
     http://192.168.1.188/projects/shopu_v2/trunk/shopu/index.php/instagram/success
谁能帮我指点一下我犯了什么错误。
提前感谢。

请告诉我您成功使用的完整url。请稍候,我将编辑url。您输入了错误的url,请尝试此
http://192.168.1.188/projects/shopu_v2/trunk/shopu/index.php/instagram/index/success
相同的404只有comingSimBeez是对的。请检查两次。你的url应该是index.php/frontname/controller/action,在你的例子中是index.php/instagram/index/successPlease告诉我你成功使用的完整url。等等,我将编辑url。你输入了错误的url,请尝试此
http://192.168.1.188/projects/shopu_v2/trunk/shopu/index.php/instagram/index/success
相同的404只有comingSimBeez是对的。请检查两次。您的url应该类似于index.php/frontname/controller/action,在您的示例中是index.php/instagram/index/success
         app/code/local/Blazedream/Instagram/Block/Loginblock/Success.php
        <?php
   class Blazedream_Instagram_Block_Loginblock_Success extends Mage_Core_Block_Template {

public function successblock() {
    $success = "success";
    return $success;    

}
}
   app/design/frontend/mtquartz03/default/layout/instagram.xml
   <?xml version="1.0"?>
     <layout version="0.1.0">
    <default>
      <reference name="content">
      </reference>
  </default>
  <instagram_index_index>  
       <reference name="content">
             <block type="instagram/loginblock" name="login.instagram" template="instagramlogin/instagram.phtml"></block>
       </reference>
  </instagram_index_index>
  <instagram_index_success>  
       <reference name="content">
             <block type="instagram/loginblock_success" name="login.success" template="instagramlogin/success.phtml"></block>
       </reference>
  </instagram_index_success>
  </layout>
       http://192.168.1.188/projects/shopu_v2/trunk/shopu/index.php/instagram
     http://192.168.1.188/projects/shopu_v2/trunk/shopu/index.php/instagram/success