コード例 #1
0
        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);
        }
コード例 #2
0
 public Conn(ConnUser connUser)
 {
     script = "Server=" + connUser.Server + "; Database=" + connUser.Database + "; Uid=" + connUser.Uid + "; Pwd=" + connUser.Pwd + "";
 }