私はこのphpコードを持っています。ファイルは別のサーバーとdbでホストされています。
$hostname_xxx = "xxxdb.db.234141.mysqldbhosted.com";
$database_xxx = "xx11xx";
$username_xxx = "xx11xx";
$password_xxx = "xx332211xx";
$shasown = mysql_pconnect($hostname_xxx, $username_xxx, $password_xxx) or trigger_error(mysql_error(),E_USER_ERROR);
$your_ip = $_SERVER['REMOTE_ADDR'];
echo $your_ip;
$insertSQL1 = "INSERT INTO table (users_ip) VALUES ('$your_ip)";
mysql_select_db($database_xxx, $xxx);
$Result21 = mysql_query($insertSQL1, $xxx) or die(mysql_error());
私が得ているエラーは
警告: mysql_pconnect() [function.mysql-pconnect]: 行 8 の /domains/4444.com/html/55.php でクエリ中に MySQL サーバーへの接続が失われました
致命的なエラー: 行 8 の /domains/4444.com/html/55.php でのクエリ中に MySQL サーバーへの接続が失われました
ありがとうジャン