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.
私はphpファイルに次の行を含めています:
$uid = $_GET['uid'];
しかし、このページを直接開くと、このエラーが発生します
注意: 未定義の変数: 6 行目の D:\xampp\htdocs\ask\index.php の uid
直接アクセスが必要な場合とそうでない場合があります
if(isset($_GET['uid'])) { $id=$_GET['uid']; } else { $id=''; }
これを試して
if($_GET['uid']!=""){ $uid = $_GET['uid']; }