Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
<?php Class Database{ private $server = "mysql:host=localhost;dbname=tera"; priv..
Decoded Output download
<?php
Class Database{
private $server = "mysql:host=localhost;dbname=tera";
private $username = "root";
private $password = "";
private $options = array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,);
protected $conn;
public function open(){
try{
$this->conn = new PDO($this->server, $this->username, $this->password, $this->options);
return $this->conn;
}
catch (PDOException $e){
echo "There is some problem in connection: " . $e->getMessage();
}
}
public function close(){
$this->conn = null;
}
}
$pdo = new Database();
?>
Did this file decode correctly?
Original Code
<?php
Class Database{
private $server = "mysql:host=localhost;dbname=tera";
private $username = "root";
private $password = "";
private $options = array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,);
protected $conn;
public function open(){
try{
$this->conn = new PDO($this->server, $this->username, $this->password, $this->options);
return $this->conn;
}
catch (PDOException $e){
echo "There is some problem in connection: " . $e->getMessage();
}
}
public function close(){
$this->conn = null;
}
}
$pdo = new Database();
?>
Function Calls
| None |
Stats
| MD5 | 710ac2e57733abbcba40d2799379f24b |
| Eval Count | 0 |
| Decode Time | 38 ms |