Code to test the success of PHP connection to MYSQL_php basics
code to test the success of php connection to mysql_php basics:
the method is very simple:
save the following code as test. php, just put it in the web directory and execute it.
<?php $link=mysql_connect("localhost","root","123"); if(!$link) echo "FAILD!连接错误,用户名密码不对"; else echo "OK!可以连接"; ?>
the parameters of the mysql_connect() function are: mysql server name or ip, mysql user name, and mysql user password.
the above is the code to test the success of php connection to mysql_php basic content. for more related content, please pay attention to the php chinese website (www.php.cn)!

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

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

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

SublimeText3 Chinese version
Chinese version, very easy to use

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