Magento “艾伦·斯托姆”;“helloworld”;config.xml文件
我在学习本教程时遇到困难。下面是我的配置文件。前端部分是否在正确的位置?我好像没法让它工作。我访问了我的站点Magento “艾伦·斯托姆”;“helloworld”;config.xml文件,magento,Magento,我在学习本教程时遇到困难。下面是我的配置文件。前端部分是否在正确的位置?我好像没法让它工作。我访问了我的站点/helloworld/index/index,但什么也没发生。会发生什么 app/code/local/alanstromdotcom/hellowrld/etc/config.xml: <config> <modules> <Alanstormdotcom_Helloworld> <ver
/helloworld/index/index
,但什么也没发生。会发生什么
app/code/local/alanstromdotcom/hellowrld/etc/config.xml:
<config>
<modules>
<Alanstormdotcom_Helloworld>
<version>0.1.0</version>
</Alanstormdotcom_Helloworld>
</modules>
<frontend>
<routers>
<helloworld>
<use>standard</use>
<args>
<module>Alanstormdotcom_Helloworld</module>
<frontName>helloworld</frontName>
</args>
</helloworld>
</routers>
</frontend>
</config>
<?xml version="1.0"?>
<config>
<modules>
<Alanstormdotcom_Helloworld>
<version>0.1.0</version>
</Alanstormdotcom_Helloworld>
</modules>
<frontend>
<routers>
<helloworld>
<use>standard</use>
<args>
<module>Alanstormdotcom_Helloworld</module>
<frontName>helloworld</frontName>
</args>
</helloworld>
</routers>
</frontend>
</config>
app/etc/modules/alanstromdotcom_Helloworld.xml
<config>
<modules>
<Alanstormdotcom_Helloworld>
<active>true</active>
<codePool>local</codePool>
</Alanstormdotcom_Helloworld>
</modules>
</config>
<?xml version="1.0"?>
<config>
<modules>
<Alanstormdotcom_Helloworld>
<active>true</active>
<codePool>local</codePool>
</Alanstormdotcom_Helloworld>
</modules>
</config>
真的
地方的
您可以尝试两种解决方案:
1) 刷新Magento的缓存并尝试重新加载页面
2) 使用(并刷新缓存)更改标记正下方的标记。您正在运行哪个版本的Magento?除了缓存问题之外,我不确定出了什么问题。我已经获取了您的文件,它们在1.4.0.1上工作得非常好(除了config.xml路径中的输入错误,除非这不是输入错误) 以下是我所做的工作: app/code/local/alanstromdotcom/Helloworld/etc/config.xml:
<config>
<modules>
<Alanstormdotcom_Helloworld>
<version>0.1.0</version>
</Alanstormdotcom_Helloworld>
</modules>
<frontend>
<routers>
<helloworld>
<use>standard</use>
<args>
<module>Alanstormdotcom_Helloworld</module>
<frontName>helloworld</frontName>
</args>
</helloworld>
</routers>
</frontend>
</config>
<?xml version="1.0"?>
<config>
<modules>
<Alanstormdotcom_Helloworld>
<version>0.1.0</version>
</Alanstormdotcom_Helloworld>
</modules>
<frontend>
<routers>
<helloworld>
<use>standard</use>
<args>
<module>Alanstormdotcom_Helloworld</module>
<frontName>helloworld</frontName>
</args>
</helloworld>
</routers>
</frontend>
</config>
0.1.0
标准
Alanstormdotcom_Helloworld
地狱世界
app/code/local/alanstromdotcom/Helloworld/controllers/IndexController.php
<?php
class Alanstormdotcom_Helloworld_IndexController extends Mage_Core_Controller_Front_Action {
public function indexAction() {
echo 'Hello Index!';
}
}
在堆栈溢出上缩进代码示例将确保它们的格式正确。该模块允许您在访问URL时加载打印hello world的URL。事情总是会发生,但不是你所期望的。描述你的期望与实际发生的事情,人们将能够帮助你。我从这个问题中删除了“风暴”标签,但为了记录艾伦,拥有你自己的标签一定很好:)@joseph mastey不是如果我必须与一个垃圾电话问题分享它,请将标签下面的标签改为????用什么?我已经刷新缓存很多次了。谢谢