• 04-02-2008, 14:25:50
    #1
    Üyeliği durduruldu
    Merhabalar öncelikle.
    İnternetten bir script buldum. Bu scripti kurmak için config.php dosyasını veritabanı bilgilerimize göre düzenlemem gerekiyor. Fakat düzenlediğim zaman :
    "Parse error: parse error, unexpected T_STRING in xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\cfg.php on line 18" şeklinde bir hata veriyor.
    Hata veren dosya ise :
    // The Internet URL of Script, INCLUDING THE TRAILING SLASH.
    // This should be something like http://www.example.com/
    $cfg['baseurl'] = 'http://localhost/deneme/';
    Bu hatayı nasıl çözebilirim?
  • 04-02-2008, 14:26:36
    #2
    tüm dosyayı yazarmısın sadece şifreni editleyip hata orda değildir
  • 04-02-2008, 14:33:28
    #3
    Üyeliği durduruldu
    18. satır diyor diye 18. satırı yazmıştım ama

    <?php
    //---------------------------------\\
    //                Script Kurulum             \\
    //                                                 \\
    //------------------------------------\\
    
    // Config vars - absolutely needed before anything really happens.
    
    ///////////////////////////////////
    // License key
    $cfg['licensekey'] = "******";
    
    // The local path on your server of Script, INCLUDING THE TRAILING SLASH.
    // This should be something like /home/yourdir/public_html/ or C:/Domains/script.com/
    $cfg['instdir'] = 'C:\Program Files\EasyPHP 2.0b1\www\gamesite\';
    // The Internet URL of Script, INCLUDING THE TRAILING SLASH.
    // This should be something like http://www.example.com/
    $cfg['baseurl'] = 'http://localhost/gamesite/';
    // Your MySQL database information information
    $cfg['sqluser'] = 'oyuncu';
    $cfg['sqlpass'] = '******';
    $cfg['sqldb'] = 'flashgame';
    $cfg['sqlhost'] = 'localhost';
    // The title of your homepage. The global site title can be changed in the admin area.
    $cfg['pagetitle'] = 'Grafigame';
    ///////////////////////////////////
    
    
    
    function critcalerror($text) {
    	echo "<body style='background-color: #CCCCCC;'><div style='color: #FF0000; font-weight: bold; text-align: center; border: 1px solid #000000; background-color: #FFFFFF; margin: 8px; padding: 4px;'>".$text."</div></body>";
    	die();
    }
    
    function obcallback($buffer) {
    	return obcallbackreplace($buffer);
    }
    
    if (!isset($adminarea)) {
    	ob_start("obcallback");
    }
    
    include "mysql.php";
    include "plugins/functions.php";
    
    $db = new mysql;
    $db->connect($cfg['sqlhost'], $cfg['sqluser'], $cfg['sqlpass'], $cfg['sqldb']);
    
    // magic_quotes sucks big time
    
    if (get_magic_quotes_gpc() == 1) {
    
    	$_REQUEST = array_map("stripslashes", $_REQUEST);
    	$_GET = array_map("stripslashes", $_GET);
    	$_POST = array_map("stripslashes", $_POST);
    	$_COOKIE = array_map("stripslashes", $_COOKIE);
    
    
    }
    
    set_magic_quotes_runtime(0);
    
    if (isset($adminarea) && !isset($_GET["act"])) {
    	include $cfg['instdir']."license.php";
    }
    
    // No access to admin area until files are removed.
    if ((is_readable($cfg['instdir']."installer.php") || is_readable($cfg['instdir']."sql.sql")) && (isset($adminarea)) && (basename($_SERVER["SCRIPT_FILENAME"])!="installer.php")) {
    	critcalerror("Please delete installer.php and sql.sql from your installation directory.");
    }
    
    ?>
  • 04-02-2008, 14:39:31
    #4
    Üyeliği durduruldu
    $cfg['instdir'] = 'C:\Program Files\EasyPHP 2.0b1\www\gamesite\';

    $cfg['instdir'] = 'C:\\Program Files\\EasyPHP 2.0b1\\www\\gamesite\\';

    değiştir
  • 04-02-2008, 14:42:04
    #5
    Üyeliği durduruldu
    bunu dene
    $cfg['instdir'] = 'C:/Program Files/EasyPHP 2.0b1/www/gamesite/';

    olmassa bu olur heralde

    $cfg['instdir'] = 'C://Program Files//EasyPHP 2.0b1//www//gamesite//';
  • 04-02-2008, 14:44:43
    #6
    Üyeliği durduruldu
    Teşekkürler yardımlarınız için...
  • 04-02-2008, 14:54:28
    #7
    sorun şurda

    $cfg['instdir'] = 'C:\Program Files\EasyPHP 2.0b1\www\gamesite\';


    bunu

    $cfg['instdir'] = 'C:\\Program Files\\EasyPHP 2.0b1\\www\\gamesite\\';

    yapıverirsen sorun çözülür,