2016-07-05 7 views

答えて

3

有効なURLを作成するには、変数をエンコードする必要があります。

機能urlencode()を使用してください。

$name = urlencode($name); 
$lname = urlencode($lname); 
$email = urlencode($email); 
$username = urlencode($username); 
$password = urlencode($password); 
$gender = urlencode($gender); 
$mobile = urlencode($mobile); 
$address = urlencode($address); 

$result = file_get_contents('http://localhost/service/service.php?action=register&name='.$name.'&lname='.$lname.'&email='.$email.'&username='.$username.'&password='.$password.'&gender='.$gender.'&mobile='.$mobile.'&address='.$address); 
+1

ありがとう – oceanier

関連する問題