yii2 - General aliases not working in hosting yii2
问题描述
I uploaded a yii2 project to a hosting, while testing the application I noticed that a plugin is not working correctly, checking more in detail and it turns out that the default aliases of yii are not working correctly, that is, it does not show anything.
Example: @web should show / emailsender / web / In this case it does not show it.
This is a screenshot from my localhost:
im just executing this line to see the alias:
<?php echo Yii::getAlias('@web/'); ?>
The project folder has permissions 0755 as well as subfolders and files like yii.bat and others, permissions 0644.
What could be wrong?. Hope you can help me.
Greetings.
解决方案
Reading Michal answer, the files was pointing between url folder (/var/www/html/...) and not web (http://doman.com/img...), i had to change the configuration of the plugins to the base URL to can access.
Now it works great.
Thanks so much and sorry for bother.
Greetings.
推荐阅读
- mongodb - 在短时间内打开许多与 mongodb 的连接导致 UncategorizedMongoDbException
- java - 如何根据 Java 中的两个符号对字符串进行转换/排序?
- java - Java - Netbeans 将 .txt 文件保存在服务器配置文件夹中的项目之外
- python - 问题在矩阵中相互调用值,python
- c# - 带字符串参数的 HttpClient GET 方法
- c# - 为什么 ConcurrentDictionary 不显式实现 Add 方法?
- java - 为什么 hashset 的性能比 list 快得多?
- c - 给定数组中的最小奇数
- mysql - 文本日期到 dateformat SQL phpmyadmin
- android - Android - 撤销权限 android.permission.CAMERA