- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我有一个 openCart 项目可以很好地在实时服务器上运行。
但是当我尝试在本地主机上运行它时,它会重定向到 https://www.localhost/dashboard/ ,我没有错。
我已经在 config.php
文件中进行了所有必要的更改。这是我的 config.php
文件:
$root = 'http://localhost/folder_name/';
$url = 'http://localhost/folder_name';
$projectpath = 'http://localhost/folder_name/';
$path = str_replace("index.php","",str_replace($root, "", $_SERVER['SCRIPT_FILENAME']));
$url2= $url.$path;
$rootfolder = $root.$path;
define('HTTP_SERVER', $url2);
// HTTPS
define('HTTPS_SERVER', $url2);*/
define('HTTP_SERVER', 'http://localhost/folder_name/admin/');
define('HTTP_CATALOG', 'http://localhost/folder_name/');
define('HTACCESS','folder_name/');
// HTTPS
define('HTTPS_SERVER', 'http://localhost/folder_name/admin/');
define('HTTPS_CATALOG', 'http://localhost/folder_name/');
// DIR
define('ROOT_APPLICATION', $root .$projectpath);
define('PROJECT_PATH', $projectpath);
define('MAIN_URL', $url.$projectpath);
define('ROOT_URL', $url2);
define('DIR_APPLICATION', $rootfolder.'catalog/');
define('DIR_SYSTEM', $rootfolder.'system/');
define('DIR_LANGUAGE', $rootfolder.'catalog/language/');
define('DIR_TEMPLATE', $rootfolder.'catalog/view/theme/');
define('DIR_CONFIG', $rootfolder.'system/config/');
define('DIR_IMAGE', $root.$projectpath.'image/');
define('DIR_CACHE', $rootfolder.'system/storage/cache/');
define('DIR_DOWNLOAD', $rootfolder.'system/storage/download/');
define('DIR_LOGS', $rootfolder.'system/storage/logs/');
define('DIR_MODIFICATION', $rootfolder.'system/storage/modification/');
define('DIR_store', $rootfolder.'system/storage/');
define('TEMPLATE_PATH', $root.$projectpath);
这是我的 .htaccess
文件:
RewriteBase /
RewriteRule ^sitemap.xml$ index.php?route=feed/google_sitemap [L]
RewriteRule ^googlebase.xml$ index.php?route=feed/google_base [L]
RewriteRule ^download/(.*) /index.php?route=error/not_found [L]
#RewriteCond %{HTTP_HOST} !^www\.(.*)$ [NC]
#RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
RewriteRule ^(.*)$ http://localhost/$1 [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css)
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]
最佳答案
请找到.htaccess:
# 1.To use URL Alias you need to be running apache with mod_rewrite enabled.
# 2. In your opencart directory rename htaccess.txt to .htaccess.
# For any support issues please visit: http://www.opencart.com
Options +FollowSymlinks
# Prevent Directoy listing
Options -Indexes
# Prevent Direct Access to files
<FilesMatch "(?i)((\.tpl|\.ini|\.log|(?<!robots)\.txt))">
Order deny,allow
Deny from all
</FilesMatch>
# SEO URL Settings
RewriteEngine On
# If your opencart installation does not run on the main web folder make sure you folder it does run in ie. / becomes /shop/
RewriteBase /folder_name/
RewriteRule ^sitemap.xml$ index.php?route=feed/google_sitemap [L]
RewriteRule ^googlebase.xml$ index.php?route=feed/google_base [L]
RewriteRule ^system/download/(.*) index.php?route=error/not_found [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css)
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]
### Additional Settings that may need to be enabled for some servers
### Uncomment the commands by removing the # sign in front of it.
### If you get an "Internal Server Error 500" after enabling any of the following settings, restore the # as this means your host doesn't allow that.
# 1. If your cart only allows you to add one item at a time, it is possible register_globals is on. This may work to disable it:
# php_flag register_globals off
# 2. If your cart has magic quotes enabled, This may work to disable it:
# php_flag magic_quotes_gpc Off
# 3. Set max upload file size. Most hosts will limit this and not allow it to be overridden but you can try
# php_value upload_max_filesize 999M
# 4. set max post size. uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields
# php_value post_max_size 999M
# 5. set max time script can take. uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields
# php_value max_execution_time 200
# 6. set max time for input to be recieved. Uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields
# php_value max_input_time 200
# 7. disable open_basedir limitations
# php_admin_value open_basedir none
# php -- BEGIN cPanel-generated handler, do not edit
# NOTE this account's php is controlled via FPM and the vhost, this is a place holder.
# Do not edit. This next line is to support the cPanel php wrapper (php_cli).
# AddType application/x-httpd-ea-php56 .php .phtml
# php -- END cPanel-generated handler, do not edit
并在本地主机的opencart文件夹中找到变量($_['site_ssl'])设置为false。(folder_name/system/config/admin.php和config.php)
$_['site_ssl'] = false;
关于php - 如何从 opencart 项目中删除 ssl 证书?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42048265/
我想使用 opencart sellya 主题在标题中显示语言下拉列表。在下面的链接上,您会在标题中看到语言下拉列表。 http://serwer1382018.home.pl/sellyakids/
谁能帮我在 opencart 中向制造商添加元数据详细信息?我正在寻找添加类似于产品或类别的元数据关键字、描述和制造商描述。 最佳答案 打开您的 opencart 数据库并将以下额外字段添加到 oc_
如何在 Opencart 上为运费加税? 我在我的网站上获得了以下结帐摘要: 小计:£332.50送货区 1:49.99 英镑增值税 (20%):66.50 英镑总计:448.99 英镑 运费为 49
我是 OpenCart 的新手,我想将我的主题应用于 OpenCart。 我知道我不应该直接编辑默认模板,但是如何复制默认模板文件并更改它以应用主题? 最佳答案 Balan,您可以从复制文件夹目录\v
我想在产品描述页面上显示货币列表。我该怎么做? 我从 header.tpl () 中复制代码并将其粘贴到 product.tpl 中,但出现错误: 注意: undefined variable :C:
我想在产品描述页面上显示货币列表。我该怎么做? 我从 header.tpl () 中复制代码并将其粘贴到 product.tpl 中,但出现错误: 注意: undefined variable :C:
我正在尝试创建一个开发站点,我可以在其中将产品添加到我的购物车和交付选项 - 然后结帐。我希望能够在不使用真实卡或支付网关的情况下执行虚拟订单 我启用了免费结账功能,但它没有出现在 OpenCart
我刚刚第 5 次安装 OpenCart,但我总是卡在同一页面上.. 我在安装时没有遇到任何错误,但是当我尝试登录到管理页面时,我总是卡住。如果我尝试使用正确的用户名/密码,它不会显示任何错误。 这里有
我正在使用 OpenCart 版本 3.0.2。 默认情况下,OpenCart 有 4 个区域,我们可以在其中放置模块到我们的布局中。即 左栏 右栏 热门内容 底部内容 我的问题是,我们是否可以以某种
除产品选项外,我的购物车似乎正常运行。当我单击“添加购物车”按钮时,会添加该项目,但不会添加任何选项。我真的不明白为什么会发生这种情况,因为我已经按照函数的需要,使用 option_id 和 opti
如果有2个vQmod /vqmod/xml/mymod1.xml & /vqmod/xml/mymod2.xml 来更改文件(例如) Catalog/model/tool/image.php,在 Op
我已经复制了一份 OpenCart 安装(版本 2.0.3.1)并放到 Windows localhost 上。 我已经解决了几个问题,但现在遇到了一个我无法解决的错误: fatal error :在
我正在编写 VQMod XML 以在 opencart 中编辑 config.php,我在 XML 下方编写并将其保存在 XML 文件夹中。 VQMOD CORE FOR OPENCART - DO
我想从 opencart 2.0 及以上版本的注册、 guest 中删除送货地址或送货地址选项,但送货方式应该在那里,因为我希望账单地址是没有额外字段的送货地址 我试图通过这两个教程在我的 openc
我是这个论坛和 OpenCart 的新手。 我需要有关在 OpenCart 中创建模块的帮助。在我的例子中,它将从我的 WordPress 安装的每个类别中获取最新的 5 个帖子,并将其显示在我的 O
我在 OpenCart 中遇到问题。 当为产品填充 SEO 关键字时,它在 Firefox 和 Chrome 上运行良好,但在 IE(版本 6.)上它崩溃了。 错误: The page you are
我已将我的产品导出到 Excel 电子表格文件中,然后我将我的产品安装到全新安装的 OpenCart 1.5.6.4 中。然后我上传了 OpenCart 2.0.3.1 并运行了升级脚本。我第一次运行
我一直在尝试使用默认模板并尝试更改它的一些功能。在我的产品页面 (catalog/view/theme/mytheme/template/product/product.tpl) 上,我想根据我的客户
在 opencart 版本 3 中有一条通知: It is very imporant that you move the storage directory outside of the web d
我的 OpenCart 网站使用 SendGrid 作为其电子邮件发送系统。直到最近,这一切都正常工作。使用需要向管理员发送电子邮件的功能时(例如,新订单提醒电子邮件、创建新帐户),我收到此错误:
我是一名优秀的程序员,十分优秀!