Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
ブラウザで "...test.php?text=Hello" を使用して php ファイルを呼び出しますが、$_POST変数は空のままです (また をprint_r($_POST)返しますarray())。
$_POST
print_r($_POST)
array()
なんで?投稿変数などを有効にする必要がありますか?
ありがとう。
URL を介して変数を渡す場合は、$_GET を使用します。また、次の方法で変数にアクセスします。
$_GET['text']
これは送信される配列であり、使用する配列内の項目を指定する必要があります。