在我知道如何将数据库导入phpMyAdmin以及如何将php文件上传到文件管理器之后,我想知道如何获取主机名以在phpMyAdmin中从数据库中插入和删除
<?php $json =file_get_contents('php://input');
$con = mysqli_connect("hostname","username","password");
if (!$con) {
die("Connection failed: " . mysqli_connect_error());
}else{
mysql_select_db('royal_sharm_property', $con); }
$sql = "SET character_set_results = 'utf8', character_set_client = 'utf8', character_set_connection = 'utf8', character_set_database = 'utf8', character_set_server = 'utf8'";
mysqli_query($con, $sql) ;
$data = json_decode($json,true); ?>
现在,如何获取我的主机名?
注意:我没有网站,只有android应用