MySQL connect on PHP

前端 未结 4 1365
情书的邮戳
情书的邮戳 2021-01-23 19:57

what is the best way to connect PHP application on MySQL.

So far I had the below connection classes.

class Connection{
    private static $server = \"127         


        
4条回答
  •  半阙折子戏
    2021-01-23 20:26

    Try to use php frameworks like codeigniter, Yii, cake php. If you implement in any one of this framework no need to write php mysql query It will automatically generate. You just need to enter your database configuration like give in below

    $db['default']['hostname'] = 'localhost';
    $db['default']['username'] = 'root';
    $db['default']['password'] = '';
    $db['default']['database'] = 'sample';
    

提交回复
热议问题