php - Android App unable to create directory on server -
i have app supposed create directory on server via url. when enter url web browser, works. when register through app, nothing appears. have tried file server , worked. file has 777 permission , still nothing on phone side. please help
this php code
$gcmregid = $_post["regid"]; $gcmusername = $_post["username"]; $gcmfoldername = $_post["foldername"]; $gcmdate = date("d/m/y"); $conn = new mysqli($servername, $username, $password, $dbname); if($conn->connect_error){ die("connection failed: " . $conn->connect_error); } $in_user = "user"; $in_password = "null"; $in_email = "null"; $in_dob = "null"; $in_role = "user"; $in_datejoined = "0000-00-00"; $sql = "insert user(password,regid,name,email,phone,dob,role,datejoined) values('$in_password','$gcmregid','$gcmusername','$in_email','$in_phone','$in_dob','$in_role','$gcmdate')"; //$gcmtest = "apa91bhuyxd_x2memxoj4jkwgyjvwv0hy6upvz-5i42jldou3ofdeutpjspcundrxg-vutihtfvdc8wstzimxiwih4yizyzqiorogg8vcv9r8azptexzrukbmikvghxpobjinljzyzsu"; $substringtitle = substr($gcmregid,-7); $combined = $gcmusername."_".$substringtitle; if($conn->query($sql)===true){ //if(is_dir("users/".$gcmfoldername)===false){ mkdir("./users/".$gcmfoldername); //echo "folder created!"; //} echo "new record created successfully"; }else{ echo "error: " . $sql . "<br>" . $conn->error; } $conn->close(); //echo $gcmregid; //file_put_contents("./gcmregid.txt",$gcmregid); echo "done!"; exit;
Comments
Post a Comment