Intermediary transaction http://www.aliyun.com/zixun/aggregation/6858.html ">seo diagnose Taobao guest cloud host technology Hall
Do thinkphp development for some time, has not written any articles, today is not busy, to A5 turned, found that the article about thinkphp and ucenter integration, and even if some is a smattering, version of outdated, Then Xiao Yu today to explain how the thinkphp framework to integrate Ucenter.
First we install thinkphp, we use this tutorial is Thinkphp3.0 stable version, first we download Thinkphp3.0, unzip and put in their own www directory, create a new index.php file in the root directory and write: require_once '. Thinkphp/thinkphp.php '; The directory will be generated by visiting index.php, thinkphp through the local machine. (*^__^*) Xi hee ... Very intelligent Oh. Then configure config.php to write your database connection configuration, this Xiao Yu will not write, please do not look at the children's shoes manual!
Then download the latest version of the Ucenter 1.6 version, in the site root directory new Ucenter, decompression ucenter, the upload directory of all files uploaded to the Ucenter directory you just created, in the browser input http://localhost/ uceter/install/If it is not this access address, please change to the corresponding access address Oh! Install Ucenter.
Then find the download of the Ucenter, the advanced directory inside the Uc_client and examples the following API folder copy to your site root directory, is a good thinkphp sibling directory Oh.
Now it's time to start the uc.php configuration in our API directory, first we open the file with the editor, we find 36 lines, and we find that we have imported a configuration file require_once discuz_root. /config.inc.php '; Based on the thinkphp directory structure, all the configuration files are placed in the Config directory, then we in the Config directory to create a new config_ucenter.php file, and uc.php file about 36 lines of require_once Discuz_ ROOT. /config.inc.php '; Modified to require_once Discuz_root. /conf/config_ucenter.php '; Some children's shoes may ask config_ucenter.php How to configure? In fact, this is very simple, even without us to write code, directly copy and paste on OK, we first login to Ucenter application management, add an application! Click on the left menu bar to apply management, Then we see that there is no application, then we click Add Application, wow, let us fill in quite a lot ah. Then we first look at the choice of application, because we are our own program, choose the other bar, the application name, this random name can be 20 bytes inside OH. Application of the main URL, we explain this is the thinkphp integration Ucenter then our thinkphp is in the directory, where I fill in http://www.ttedu.com.cn children's shoes if it is local to fill out http://localhost Do not add "/" Oh, the following is the application of IP, after the explanation said not to fill out, then we leave it, think I am more lazy Oh! Apply the key? In fact, here casually write some strings can be, this key is two programs between the serious interoperability, the equivalent of you go to someone else's home to take things, others at least to know you, if the other people do not know you, how will give you things? Moreover is the website core member information. We test use, casually fill in the point bar "123456" Oh, I am lazy! Application of the physical path? Also prompted that you can not fill out, then leave it blank! Profile page? This is a bit of a puzzle, how can ucenter be so smart? Application name, he's already filled it up for me, let's skip it!
Label single display template don't know what to do. Skip it. Label template tag description continues to skip.
Whether to turn on sync login This is not to mention the check. Whether to accept the notification continues to be selected. OK the basic information is completed, submitted under. Communication failed? What's the big headache? We look at the following "Application of Ucenter configuration information" On the right side also detailed instructions: when the application of Ucenter configuration information is lost, you can copy the left side of the code to the application of the configuration file. Everything became clear. Copy the configuration information in the text box, I remember we created a new config_ucenter.php file is still empty, do you put it here? then try it! Paste the information into it and save it. Look at Ucenter Refresh! OK Communication Successful! Yes, basic communication we're done!
Some tired, take a rest! Write tomorrow! Xiao Yu's website: Beijing tutor Net. We can see the effect of integration!
ThinkPHP3.0 Integration UCenter1.6 (II.)