public string gerarBanco(ConnUser bd) { string obj = ""; obj = "<?php \nclass BDConexao{\n" + "\n" + "\t public function getConexao(){" + "\n\t\t$conn = new mysqli(\"" + bd.Server + "\", \"" + bd.Uid + "\", \"" + bd.Pwd + "\", \"" + bd.Database + "\");" + "\n\t\treturn $conn;" + "\n\t}" + "\n}" + "\n?>"; return(obj); }
public Conn(ConnUser connUser) { script = "Server=" + connUser.Server + "; Database=" + connUser.Database + "; Uid=" + connUser.Uid + "; Pwd=" + connUser.Pwd + ""; }