How to share data between the two sites

Source: Internet
Author: User

I believe many people are familiar with the dream program. I am here to share with you some tips on its powerful functions.

How can we achieve data sharing between two sites when we use two sets of dream weaving programs? I have not found it on the internet for a long time. I have figured out a method and want to share it with you. The condition for implementing this method is that the database you bought supports external database calls. Otherwise, you can only find another database. The procedure is as follows:

1. First, find the database connection, find the/data/tag/SQL. inc. php file in sequence, open the file, and see the following code. Write down your database configuration, save and close it!

// Dbsql database connection Configuration

//------------------------------------------------------------------------

$ Sqltag ['dbsql'] ['dbhost'] = 'database ip ';

$ Sqltag ['dbsql'] ['dbname'] = 'database name ';

$ Sqltag ['dbsql'] ['dbuser'] = 'database username ';

$ Sqltag ['dbsql'] ['dbpwd'] = 'database password ';

$ Sqltag ['dbsql'] ['dbprefix'] = 'database table prefix; default value: dede _';

$ Sqltag ['dbsql'] ['dblanguage'] = 'encoding format, such as utf8 and gb2312 ';

2. log onto the Space Provider control panel and fill in the authorized IP address in the database, that is, the IP address of the Data website you use to call. It is generally supported. You can ask the Space Provider, for example:

  

 

3. Write the following code as needed:

{Dede: SQL = "select * from dede_archives orderby id desc limit 0, 10" appname = "dbsql "}

[Field: title/]

{/Dede: SQL}

Use the {dede: SQL} label for calling. The appname = "dbsql" here is the name in the database link configuration in step 1.

This is the data that one party calls the other. Likewise, the two sites can call each other to enrich the website. Welcome to join www.321jm.com for a reprinted Project

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.