osCommerce 链接到的类别进入错误页面
我正在修改一个用 osCommerce 制作的网站(我没有制作这个网站),我必须修改的内容之一是主页的外观。我的问题是我修改了 index.php 文件,并且所有更改看起来都很好。
但是,当我单击使用此函数用 PHP 编写的链接时:(
<?php echo tep_href_link(FILENAME_DEFAULT,'cPath=24&sort=2a') ?>
在 /includes/filenames.php
中,我有 define('FILENAME_DEFAULT', 'index.php');
。)
发生的情况是,它显示了正确的结果,但在不同的页面中,采用旧的设计。我不明白它,因为该链接应该将我带到我修改过的同一个 index.php ,但显然它会将我带到其他地方。
我不知道它显示的是哪个页面,我唯一看到的是 PHP 函数编写的链接:
(my_catalog_folder)/escaparate-c-24.html?sort=2a&osCsid=p7fp55t489nv042p0ip4mp7si1
我猜 tep_href_link()
正在写这个,但我不知道哪个页面用于显示结果。
任何线索将不胜感激!
I'm modifying a website made with osCommerce (I didn't make this website), and one of the things I have to modify is the look of the home page. My problem is that I have modified the index.php file, and all the changes look fine.
However, when I click a link that has been written in PHP with this function:
<?php echo tep_href_link(FILENAME_DEFAULT,'cPath=24&sort=2a') ?>
(In /includes/filenames.php
I have define('FILENAME_DEFAULT', 'index.php');
.)
What happens is that it shows the correct results, but in a different page, with the old design. I don't understand it, because that link should take me to the same index.php that I modified, but obviously it's taking me somewhere else.
I don't know what page is it showing, the only thing I see is the link written by the PHP function:
(my_catalog_folder)/escaparate-c-24.html?sort=2a&osCsid=p7fp55t489nv042p0ip4mp7si1
I guess that the tep_href_link()
is writing that, but I don't know what page is using to show the results.
Any clues would be much appreciated!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果商店安装了 SEO URL 模块,这是预期的行为。
查看
.htaccess
文件,您应该会发现这一行:对某个类别的任何和所有请求都将被重写为更友好的 URL 字符串,如您注意到的那样。
至于旧设计的使用,请使用
$_SERVER["PHP_SELF"];
或$ 中的
并确保文件名和路径正确。echo
仔细检查正在调用的实际文件_SERVER["SCRIPT_NAME"];将其放入像
includes/application_top.php
这样的文件中,放在最后几行之前(或者结束?>
如果您仍然有的话):这也可能是由于页面的缓存。检查是否还安装了缓存模块。
This is expected behaviour if the store has the SEO URLs module installed.
Look in the
.htaccess
file and you should spot this line:Any and all requests for a category will be rewritten in a friendlier URL string like the one you noted.
As to the use of the older design, double-check the real file being called with an
echo
out of the$_SERVER["PHP_SELF"];
or$_SERVER["SCRIPT_NAME"];
and make sure the filename and path is correct.Drop that into a file like
includes/application_top.php
before the final lines (or the closing?>
if you still have that there):It may also be due to caching of the pages. Check to see if there a cache module installed as well.