Ignore:
Timestamp:
Mar 27, 2022, 7:51:34 PM (3 years ago)
Author:
roby
Message:

Ritocchi e sistemazioni varie di completamento delle mofifiche precedenti

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/client/modules.php

    r345 r362  
    9999
    100100
    101 $dbi = new PDO("mysql:host=$dbhost;charset=latin1", $dbuname, $dbpass, array(PDO::ATTR_EMULATE_PREPARES => false,
     101$dbi = new PDO("mysql:host=$dbhost;charset=utf8", $dbuname, $dbpass, array(PDO::ATTR_EMULATE_PREPARES => false,
    102102                                                                                                PDO::ATTR_ERRMODE=>PDO::ERRMODE_EXCEPTION));   
    103103$sql = "use $dbname";
    104104$dbi->exec($sql);
     105        $sth = $dbi->prepare("SET SESSION character_set_connection = 'utf8' ");
     106        $sth->execute();
     107        $sth = $dbi->prepare("SET SESSION character_set_client = 'utf8' ");
     108        $sth->execute();
     109        $sth = $dbi->prepare("SET SESSION character_set_database = 'utf8' ");
     110        $sth->execute();
     111        $sth = $dbi->prepare("SET CHARACTER SET utf8");
     112        $sth->execute();
     113
     114        $sth = $dbi->prepare("SET NAMES 'utf8'");
     115        $sth->execute();
    105116
    106117# protezione csrf ottobre 2012 - by l.apolito
Note: See TracChangeset for help on using the changeset viewer.