我试图远程插入表格。我的数据库是MS sql server 2016 我试过这样的东西,但它不起作用:
define("DB_SERVER", "192.168.50.112");
define("DB_USER", "srv-website");
define("DB_PASS", "Website4JET$");
define("DB_NAME", "FTECHDAS01");
define("TBL_USERS", "[2016_TestJET].[dbo].[Persons]");
$connection = mysql_connect(DB_SERVER, DB_USER, DB_PASS) or die(mysql_error());
mysql_select_db(DB_NAME, $connection) or die(mysql_error());
function addNewUser($id, $name) {
global $connection;
$q = "INSERT INTO ".TBL_USERS." ([PersonID],[LastName]) VALUES ('$id', '$name')";
return mysql_query($q, $connection);
}
但我总是这样:
未找到
HTTP错误404.找不到请求的资源。
我该怎么办?以及远程服务器应该改变什么!?