Magento开源2.3

编程入门 行业动态 更新时间:2024-10-15 16:20:55
本文介绍了Magento开源2.3-CSS和JS无法加载的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我成功安装了Magento 2.3,但是当键入

I installed Magento 2.3 successfully but when type

,这些是在控制台中发现的错误:

and these are the errors found in the console:

管理面板上也面临相同的问题.我当前的PHP版本是7.2.14.

The same issue is also faced on the admin panel. My current version of PHP is 7.2.14.

推荐答案

您不能将localhost/用作Magento 2的域名,至少应使用localhost/.

You cannot use localhost/ as domain name with Magento 2, you should at least use localhost/.

  • 在Docker/XAMP/MAMP/WAMP中更改您的vHost ...以匹配您的新域名,例如localhost/;

    使用sudo权限编辑主机文件:

    Edit your hosts file with sudo permissions :

    • Debian/MacOS:/etc/hosts

    Windows:C:\Windows\System32\drivers\etc\hosts

    在文件的底部,添加以下内容:127.0.0.1 localhost

    At the bottom of the file, add the following: 127.0.0.1 localhost

    转到您的Magento数据库并运行以下查询:

    Go to your Magento db and run the following query :

    UPDATE `core_config_data` SET `value`='localhost/' WHERE `value`='localhost/';

  • 最后,使用命令行:
  • cd /YOUR/PROJECT/PATH php bin/magento setup:upgrade php bin/magento setup:di:compile php bin/magento setup:static-content:deploy

  • 转到localhost/(或根据您的配置,选择localhost/Magento2/),然后检查是否一切正常.
  • Go to localhost/ (or localhost/Magento2/, according to your configuration), and check if everything works.
  • 更多推荐

    Magento开源2.3

    本文发布于:2023-11-02 00:16:34,感谢您对本站的认可!
    本文链接:https://www.elefans.com/category/jswz/34/1550818.html
    版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
    本文标签:开源   Magento

    发布评论

    评论列表 (有 0 条评论)
    草根站长

    >www.elefans.com

    编程频道|电子爱好者 - 技术资讯及电子产品介绍!