php - 我将如何去显示我的数据库中的用户个人资料图片?

标签 php mysql database image display

这些图片已经在我的数据库中,我试图在它们登录后在窗口右上角的下拉菜单中显示它们。 这是我的网站目前正在做的事情:

enter image description here

右上角高亮的蓝色部分应该是显示图片的地方,但显然没有显示出来。但正如您在页面下方看到的,我的图片显示。 我不确定为什么它不会出现在下拉菜单中。 我的下拉菜单的代码在这里:

<?php
                            include ('core.php');
                            include ('link.php');
                            include ('profile.php');
                            if(isset($_SESSION["steamid"]))
                            {

                            echo'<li class="dropdown">
                                <a href="" class="dropdown-toggle profile waves-effect" data-toggle="dropdown" aria-expanded=""><img src="'.$steamprofile['avatarfull'].'" alt="user-img" class="img-circle"> </a>
                                <ul class="dropdown-menu">
                                    <li class="notifi-title">'.$steamprofile['personaname'].'</li>
                                    <li><a href="profile.php"><i class="ti-user m-r-5"></i> Profile</a></li>
                                    <li><a href="usersettings.php"><i class="ti-settings m-r-5"></i> Settings</a></li>
                                    <li><a href="userhistory.php"><i class="ti-book m-r-5"></i> History</a></li>
                                    <li><a href="steamauth/logout.php"><i class="ti-power-off m-r-5"></i> Logout</a></li>
                                </ul>
                            </li>';

最佳答案

你必须把有个人资料图片的文件夹的名字放在

<img src='folder/'.$steamprofile['avatarfull'].'' alt="user-img" class="img-circle">

关于php - 我将如何去显示我的数据库中的用户个人资料图片?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36381024/

相关文章:

PHP/MySQL 在搜索中包含替代拼写

php - 从 WooCommerce 电子邮件中删除货到付款说明

java - PHP MySQL 和 Android 连接

php - 在 mysql 中存储复选框值

sql-server - 如何查找当前使用的数据库名称?

php - Web 应用程序,用户上传文件夹最安全的地方

php - 显示结果然后提供导出到 .csv 的选项?

Mysql:重复键更新所有值?

mysql - 如何过滤网站上用户输入的mysql数据库,然后将过滤后的表吐回网站?

python - 在 Python 中比较两个文本 block