| Server IP : 172.67.216.113 / Your IP : 172.71.28.146 [ Web Server : Apache System : Linux cpanel01wh.bkk1.cloud.z.com 2.6.32-954.3.5.lve1.4.59.el6.x86_64 #1 SMP Thu Dec 6 05:11:00 EST 2018 x86_64 User : cp648411 ( 1354) PHP Version : 7.2.34 Disable Function : NONE Domains : 0 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home2/cp648411/public_html/ilawasia.onnud20.com/class/ |
Upload File : |
<?php
error_reporting(0);
class Connect{
private $host="localhost";
private $user="cp648411_ilawus";
private $password="P@Module!!!";
private $dbname="cp648411_ilawdb";
private $charset='utf8';
/*
public function getdata($data)
{
$replace = "'";
$replaceby = "\'";
$data = str_replace($repalce,$replaceby,$data);
return $data;
}
*/
public function setconnect()
{
$connect=mysqli_connect($this->host,$this->user,$this->password,$this->dbname);
$connect -> set_charset("utf8");
if($connect)
{
$connectstat="success";
}else{
$connectstat="not success";
}
return $connect;
}
// escape ข้อมูลอย่างถูกต้อง
public function getdataF($connect, $data)
{
return mysqli_real_escape_string($connect, $data);
}
}
?>