Hata Nerede PHP?
-
arkadaşlar elimde bi script var. conf dosyası aşağıdaki gibi. veritabanı bilgilerini giriyorum fakat ya veritabanı ya da tablolar bulunamadı hatası alıyorum.
halbuki tablolar var sql başarı ile tabloları oluşturdu. (sadece duyuru diye bi tablo oluşturmadı sanırım hata o ama bi bakın)
kodlar şöyle..
function temizle($metin){
//remove unnecessary chars, which way is more suitable for you... (0)
/*$metin=str_replace("\n","",$metin);
$metin=str_replace("\'","`",$metin);
$metin=str_replace("<","«",$metin);
$metin=str_replace(">","»",$metin);
$metin=str_replace("\\","|",$metin);
$metin=str_replace("\"","“",$metin);*/
$metin=str_replace("\'","`",$metin);
$metin=trim(htmlspecialchars ($metin));
return $metin;
}
function baglan($bos){
//you need to edit this line for your database user and password... (1)
return mysql_connect("localhost","heyetiiii_ddd","sifrem123");
//return mysql_connect("localhost","","");
}
//you need to edit this line for session save path... (2)
$sessPath="/tmp";
//$sessPath="/temp";
$yol=baglan('');
//you need to edit this line for your site information... (3)
$dosya_dizin = "/var/www/sub/sinav/yollanan"; //for windows, apache
//$dosya_dizin = "/var/www/html/sinav/yollanan"; //for linux
$dosya_url = "http://sinav.heyeti.com/yollanan"; //your upload site address
//you need to edit this line for general language... (4)
$defaultLang='turkish';
//$defaultLang='english';
//you need to edit this line to change the database name... (5)
if(!mysql_select_db("duyuru",$yol))
{die( "Veritabanı veya tablolar yok, MySQL'de oluşturulması gereklidir!
You need to create database and proper tables in MySQL");
}
$versiyon="gizli olsun burası";
?> -
hata kodunu yaz hacı bide daha iyi anlıyabilirim o zaman
-
Lathedarkman bunu yazdı:
-----------------------------
hata kodunu yaz hacı bide daha iyi anlıyabilirim o zaman
-----------------------------hata kodu yok hocam
Veritabanı veya tablolar yok, MySQL'de oluşturulması gereklidir!
You need to create database and proper tables in MySQL -
Hocam duyuru diye tablo değilde o duyuru yazan yeri veritabanı adınla değiştirmeyi dene bi.
if(!mysql_select_db("duyuru",$yol))
Düzenleme : Birde bağlantı dosyasında çok gereksiz hamleler yapmış. Hocam yukarıda yazdığım olmazsa sana bu script için başka bir bağlantı dosyası oluşturayım.
