Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/url/2.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/bash/18.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 如何在opencart中更改新html页面的url?_Php_Url_Opencart2.x - Fatal编程技术网

Php 如何在opencart中更改新html页面的url?

Php 如何在opencart中更改新html页面的url?,php,url,opencart2.x,Php,Url,Opencart2.x,我在opencart 2.0.3.1的根目录中创建了一个新的Php页面,例如test.Php 现在的地址是:my_domain.com/test.php,但是我希望它变成:my_domain.com/test 我该怎么做?您可以做以下几点: 您现在拥有的: Root index.php test.php 您可以做的是: Root index.php test index.php 网站将始终查找索引文件 如果您创建一个新文件夹(在本例中为“tes

我在opencart 2.0.3.1的根目录中创建了一个新的
Php
页面,例如test.Php

现在的地址是:
my_domain.com/test.php
,但是我希望它变成:
my_domain.com/test


我该怎么做?

您可以做以下几点:

您现在拥有的:

Root
    index.php
    test.php
您可以做的是:

Root
    index.php
    test
        index.php
网站将始终查找索引文件

如果您创建一个新文件夹(在本例中为“test”)并在其中放置索引,您的页面地址将如下所示:
my_domain.com/test

另外,如果您需要index.php中的链接进行测试。您只需执行以下操作:

<a href="test/">Link</a>