我如何获取我的Android php文件的数据库主机名?

时间:2018-11-29 18:10:36

标签: php mysql web-services phpmyadmin cpanel

在我知道如何将数据库导入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); ?>

现在,如何获取我的主机名?

enter image description here

注意:我没有网站,只有android应用

0 个答案:

没有答案
相关问题