Discuz!官方免费开源建站系统

 找回密码
 立即注册
搜索

[疑难] 数据调用怎么判断有无头像?

[复制链接]
ndg 发表于 2008-6-1 22:33:57 | 显示全部楼层 |阅读模式
不知道是那个字段,谁能告诉我一下
回复

使用道具 举报

dwxie 发表于 2008-6-1 22:42:33 | 显示全部楼层
不用判断的 直接可以用 因为人人都有头像的
回复

使用道具 举报

 楼主| ndg 发表于 2008-6-1 22:44:57 | 显示全部楼层
我的意思是把默认头像的排除掉
回复

使用道具 举报

haskey 发表于 2009-1-4 15:18:51 | 显示全部楼层
  1. /**
  2. * 检测是否存在指定头像
  3. * @param        integer                $uid        用户id
  4. * @param        string                $size        头像尺寸,取值范围(big,middle,small),默认为 middle
  5. * @param        string                $type        头像类型,取值范围(virtual,real),默认为virtual
  6. * @return        boolean
  7. *                true : 头像存在
  8. *                false: 头像不存在
  9. */
  10. function uc_check_avatar($uid, $size = 'middle', $type = 'virtual') {
  11.         $url = UC_API."/avatar.php?uid=$uid&size=$size&type=$type&check_file_exists=1";
  12.         $res = @file_get_contents($url);
  13.         if($res == 1) {
  14.                 return 1;
  15.         } else {
  16.                 return 0;
  17.         }
  18. }
复制代码
回复

使用道具 举报

xiebinren 发表于 2009-9-2 23:02:56 | 显示全部楼层
/**
* 检测是否存在指定头像
* @param        integer                $uid        用户id
* @param        string                $size        头像尺寸,取值范围(big,middle,small),默认为 middle
* @param        string                $type        头像类型,取值范围(virtual,real),默认 ...
haskey 发表于 2009-1-4 15:18

怎么调用这函数
回复

使用道具 举报

xloueye 发表于 2009-9-4 19:26:53 | 显示全部楼层
回复

使用道具 举报

sam899 发表于 2009-9-19 13:23:16 | 显示全部楼层
为什么这么简单的一个功能,到了7.0都还是没有加进去呀
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Discuz! 官方站 ( 皖ICP备16010102号 )star

GMT+8, 2025-9-14 06:06 , Processed in 0.117020 second(s), 14 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表