Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The necessary configuration after the project svn of the thinphp framework is checked out again

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Just tried to understand the thinkphp framework, here to make some notes, followed by a new summary will be updated here, if there are any mistakes and omissions, please correct.

For projects using the thinkphp framework, after checking out again with svn, you need to make some basic configuration before you can open the relevant web page locally and use it normally.

Configuration of database

You can view all the local databases under cmd, find the database of the project to be configured, and then configure the local database name under config.inc.php.

Cmd command:

Find the local server management software, for example, mine is wamp, and find the following path under wamp:

On the command line, first lock the command line under the database folder, make sure that the database service is turned on, and then enter your own database:

-hlocalhost-uroot-p

-h only connected host address, local is localhost, remote connection to other hosts is-h227.0.0.1 (etc.)

-u is to enter the user name,-u can be followed by a space, or there can be no space,-p must be followed by no space, otherwise re-enter the password

If you have just installed mysql, you don't have a password, just enter. The prompt for mysql is mysql >

Remember: database commands must add semicolons, exit commands do not add semicolons.

The command to exit the current database:

Quit

Exit

\ Q

View the database on this machine:

Show databases

Use a database:

Use [databasename]

View all the datasheets:

Show tables

Find everything in the table:

Select * from kred_account

Find the contents of a field in the table:

Select id from kred_account

View the sections of the table

Describe field name

Create a new database

In database software (navicat), create a new database

Character set and collation options default!

Right-click on the new database and run the SQL file to import the local database file!

Other options default.

Add a new table to the database:

Method 1: right-click to add a new table

Enter the field, set the required key as the primary key, and when you save it, you will be asked to enter the table name

Method 2: query-- create a query-- paste the database code that has been written, run, and show the rows that are not affected, then the table is created successfully.

Configuration of the local server

In wampp-apache-httpd.conf

Or find it through the path

Find the apache httpd.conf path

In the last few lines

Change this to the path of the address link project when you log in locally

Local hosts configuration

To configure the login address in the hosts file

Path: C:\ Windows\ System32\ drivers\ etc

As shown in the figure:

Write the address name here, which determines the URL to open the web page locally.

Do not submit these changes to the svn, this is the local configuration, the submission will affect the operation of the rest of the team.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report