mysql - think-php的后台用Python重写一下,需要用到哪些知识?
商家端后台是thinkphp的,数据库是Mysql,现在要把这个后台用python写一遍,然后做个网页自适应,用手机端可以登录。
商家端后台功能包括:商家登录,查看该商家的订单详细信息,查看用户购票信息,以及点击兑票。
现在就没有太多的途径,我大概的思路是:
用flask写一个登录页面,账号密码也是从之前的Mysql里面取,然后后台的数据显示直接调用Mysql,‘点击兑票’按钮的功能也是直接改变数据库的某一数值‘。
我是Php+python新手。现在有以下几个问题:
①python的web程序可以跟Php的放在同一个服务器里面吗?
②python的页面按钮直接调用数据库该如何去写?用到什么库?
③在thinkphp的数据库里面取得账号密码经过了md5处理,用Python写的登录页面是不能登录吧?
回复内容:
商家端后台是thinkphp的,数据库是Mysql,现在要把这个后台用python写一遍,然后做个网页自适应,用手机端可以登录。
商家端后台功能包括:商家登录,查看该商家的订单详细信息,查看用户购票信息,以及点击兑票。
现在就没有太多的途径,我大概的思路是:
用flask写一个登录页面,账号密码也是从之前的Mysql里面取,然后后台的数据显示直接调用Mysql,‘点击兑票’按钮的功能也是直接改变数据库的某一数值‘。
我是Php+python新手。现在有以下几个问题:
①python的web程序可以跟Php的放在同一个服务器里面吗?
②python的页面按钮直接调用数据库该如何去写?用到什么库?
③在thinkphp的数据库里面取得账号密码经过了md5处理,用Python写的登录页面是不能登录吧?
1、当然可以,前端统一走nginx接入即可
2、pip install mysql
3、基于2,取出来用户名和密码之后自己md5是一样的

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



PHP is suitable for web development and rapid prototyping, and Python is suitable for data science and machine learning. 1.PHP is used for dynamic web development, with simple syntax and suitable for rapid development. 2. Python has concise syntax, is suitable for multiple fields, and has a strong library ecosystem.

PHP is mainly procedural programming, but also supports object-oriented programming (OOP); Python supports a variety of paradigms, including OOP, functional and procedural programming. PHP is suitable for web development, and Python is suitable for a variety of applications such as data analysis and machine learning.

PHPhassignificantlyimpactedwebdevelopmentandextendsbeyondit.1)ItpowersmajorplatformslikeWordPressandexcelsindatabaseinteractions.2)PHP'sadaptabilityallowsittoscaleforlargeapplicationsusingframeworkslikeLaravel.3)Beyondweb,PHPisusedincommand-linescrip

PHP originated in 1994 and was developed by RasmusLerdorf. It was originally used to track website visitors and gradually evolved into a server-side scripting language and was widely used in web development. Python was developed by Guidovan Rossum in the late 1980s and was first released in 1991. It emphasizes code readability and simplicity, and is suitable for scientific computing, data analysis and other fields.

To view the Git repository address, perform the following steps: 1. Open the command line and navigate to the repository directory; 2. Run the "git remote -v" command; 3. View the repository name in the output and its corresponding address.

There are many ways to customize a development environment, but the global Git configuration file is one that is most likely to be used for custom settings such as usernames, emails, preferred text editors, and remote branches. Here are the key things you need to know about global Git configuration files.

I encountered a tricky problem when developing a small application: the need to quickly integrate a lightweight database operation library. After trying multiple libraries, I found that they either have too much functionality or are not very compatible. Eventually, I found minii/db, a simplified version based on Yii2 that solved my problem perfectly.

When developing a project that requires parsing SQL statements, I encountered a tricky problem: how to efficiently parse MySQL's SQL statements and extract the key information. After trying many methods, I found that the greenlion/php-sql-parser library can perfectly solve my needs.
