Table of Contents
回复内容:
Home Backend Development PHP Tutorial mysql - think-php的后台用Python重写一下,需要用到哪些知识?

mysql - think-php的后台用Python重写一下,需要用到哪些知识?

Jun 06, 2016 pm 08:23 PM
flask linux mysql 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是一样的

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

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

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Choosing Between PHP and Python: A Guide Choosing Between PHP and Python: A Guide Apr 18, 2025 am 12:24 AM

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 and Python: Different Paradigms Explained PHP and Python: Different Paradigms Explained Apr 18, 2025 am 12:26 AM

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.

PHP's Impact: Web Development and Beyond PHP's Impact: Web Development and Beyond Apr 18, 2025 am 12:10 AM

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

PHP and Python: A Deep Dive into Their History PHP and Python: A Deep Dive into Their History Apr 18, 2025 am 12:25 AM

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.

How to check the warehouse address of git How to check the warehouse address of git Apr 17, 2025 pm 01:54 PM

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.

How to set important Git configuration global properties How to set important Git configuration global properties Apr 17, 2025 pm 12:21 PM

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.

Solve database connection problem: a practical case of using minii/db library Solve database connection problem: a practical case of using minii/db library Apr 18, 2025 am 07:09 AM

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.

How to solve SQL parsing problem? Use greenlion/php-sql-parser! How to solve SQL parsing problem? Use greenlion/php-sql-parser! Apr 17, 2025 pm 09:15 PM

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.

See all articles