Jump to content

Php De Hata ?


Recommended Posts

kot aşağıdaki gibi ($git=$_GET["git"];) burada hata veriyor hhata şu şekilde ( Notice: Undefined index: git in C:\wamp\www\site\case.php on line 3)
çözemedim
<?php

$git=$_GET["git"];
switch($git){
default:
include("sayfalar/anasayfa/index.php");
break;

case"uyehesabi":
include("sayfalar/anasayfa/index.php");
break;



}
?>

Link to comment
Share on other sites

[quote name='blackman12' date='10 July 2012 - 23:03 ' timestamp='1341950602' post='1220363']
Kazım ya default değerse?

$git=$_GET["git"];

satırını

$git=@$_GET["git"];

ile değiştir.
[/quote]

defaultu düşünmedim ama doğrusu verdiğin gibi abi.... bir projede sadece bu hatanın olacağını sanmıyorum.. o nedenle error_reporting ile sorunu baştan çözmek daha mantıklı.. E_ALL dan E_NOTICE parametresini çıkartarak sadece kiritk hatalrı göstermesi daha mantıklı oalcaktır :)

Link to comment
Share on other sites

Olan başına @ eklemekle çözülmez. Sadece @ işareti hatayı ekrana yazmaz o kadar. ama o hata loha hep işler ;) yani sorun hala devam ediyor. git komutundan sonra gidilecek sayfayi sayfa.php şeklinde girmiş olsan veya localition olarak girmiş olsan hatasız geçiş sağlarsın ;)

Link to comment
Share on other sites

denizcafem arkadaşım, bu bir sorun değildir sadece get e değer atanmadığı için $get değişkeni oluşturulmaz. $get değişkeni de caselerdeki hiç bir duruma uymadığından default değer çalışacaktır ve sayfa düzgün görüntülenecektir.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...