This is a translated page. The original can be found here: http://iwebdevel.com/2009/07/20/codinghow-to-fetch-user-profile-data-with-ssi-php-from-a-smf-forum-database/
UPDATES VIA RSS | Email威盛最新的RSS | 电子邮件 Get updates via feedburner Get updates via twitter
Home / Coding / MySQL / PHP / Coding:How to fetch user pro… 首页 / 编码 / MySQL的 / PHP的 /编码:如何获取用户的亲...

Coding:How to fetch user profile data with SSI.php from a SMF forum database 编码:如何获取从证券保证金融资论坛数据库SSI.php用户配置文件数据

Posted on 20.发布20。 Jul, 2009 by Dragos in Coding , MySQL , PHP 2008年7月,2009年在编码 ,MySQL的 ,PHP的 德拉戈什

Even though SMF offers a way to integrate their forum into any website, they do not provide enough information on how to do some basic tasks, eg fetching a member's profile details from the database.即使单模光纤提供了一种集成到任何网站的论坛,他们不提供有关如何执行一些基本任务的足够信息,例如从数据库中提取成员的概况。 Fortunately, Netbeans has a very helpful feature, the code Navigator which shows an instant preview of all functions available in an open file.幸运的是,NetBeans具有一个非常有用的特性,代码导航显示的所有功能,在公开文件中提供即时预览。 So finding the function which does our job was pretty easy (though I couldn't find it on SMF's website).因此,寻找功能,我们的工作确实是很容易(虽然我没有找到对单模光纤的网站上)。

Anyway, to fetch data from the SMF database, using SMF's functions, we need to include SSI.php into our website.无论如何,获取从战略火箭数据库中的数据,使用SMF的功能,我们需要纳入我们的网站SSI.php。

 include_once('path/to/your/forum/SSI.php'); // replace path/to/your/forum with your path to the SMF forum include_once('路径/来/你/论坛/ SSI.php'); / /替换路径/为/你/论坛与您的路径,证券保证金融资论坛 
 $userData=ssi_fetchMember(1,''); //ssi_fetchMember() takes two parameters: first: the member id as an integer or more than one id passed in an array; second parameter: output method as string: 'echo' or ''; $用户数据= ssi_fetchMember(1 ,''); / / ssi_fetchMember()有两个参数:第一:成员为一个整数或一个以上的身份证号通过一个数组,第二个参数:输出字符串方法:'回声'或''; 
 print_r($userData); //display the array containing the member's profile data print_r($用户数据); / /显示数组,包含了成员的个人资料数据 
Translate this post翻译这个职位


Related posts:相关岗位:

  1. PHP Error: Call to a member function fetch_assoc() on a non-object in PHP的错误:调用一个成员函数fetch_assoc()在一个非对象

    blog comments powered by Disqus 博客评论 Disqus