• 01-03-2010, 16:31:00
    #1
    Üyeliği durduruldu
    Arkadaşlar elimde bir script var sql dosyasını yükledim ancak DB bağlantısı için configirasyon dosya ayarlarını bir türlü yapamadım 15-20 olasılık denedim..DB bilgilerinin tam olarak nereye nasıl yazılacağını bir türlü bulamadım aşağıda dosya mevcuttur neyin nereye yazılacağını belirten olursa sevinirim....

    <?
    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","server","server");
    //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 = "/apache/htdocs/sinav/yollanan"; 	//for windows, apache
    //$dosya_dizin = "/var/www/html/sinav/yollanan";	//for linux	
    $dosya_url = "http://localhost/sinav/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!<br>You need to create database and proper tables in MySQL");
    }
    
    $versiyon="1.26";
    ?>
  • 01-03-2010, 23:55:46
    #2
    function baglan($bos){
    //you need to edit this line for your database user and password... (1)
    return mysql_connect("localhost","DBKULLANICIADI","SIFRESI");
    //return mysql_connect("localhost","","");
    }
    Bu sekilde denermisiniz bir.
  • 02-03-2010, 03:31:22
    #3
    Üyeliği durduruldu
    Teşekkürler üstad çözdüm sorunu dediğiniz yer doğru ayrıca en altta da database ismi giriliyor..Sağolun....