-
Notifications
You must be signed in to change notification settings - Fork 840
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FileService::getBaseUriLocal() 返回的路径不对 #47
Comments
我当前环境测试是正常的 |
如果部署的文件夹带. 如Think.Admin。将会执行ltrim(dirname($base), DS)。导致root为空。然后就少了Think.Admin这一级。 |
/**
* 获取服务器URL前缀
* @return string
*/
public static function getBaseUriLocal()
{
$appRoot = request()->root(true);
$uriRoot = preg_match('/\.php$/', $appRoot) ? dirname($appRoot) : $appRoot;
return "{$uriRoot}/static/upload/";
} 你看这样,可以解决你的问题不? |
相关代码已经更新! |
可以的,我自己修改的代码是使用 TP的 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
缺少了 Think.Admin (${root})
结果为
The text was updated successfully, but these errors were encountered: