Visualizzazione dei risultati da 1 a 9 su 9

Discussione: ERRORE INSTALLER

  1. #1

    ERRORE INSTALLER

    sono arrivato al punto che non trovo + l'errore (cioè non capisco da cosa è dato!)
    errore:
    Parse error: parse error, unexpected $ in admin/install/install.php on line 168

    casomai date una controllatina al codice per vedere se ho fatto bene!

    Codice PHP:

    //ULTIME RIGHE (dove dà errore!)

    function get_sql()
    {

    $SQL = array();

    $SQL = array();

    $SQL "CREATE TABLE....";
    $SQL "CREATE TABLE....";
    $SQL "CREATE TABLE....";
    $SQL "CREATE TABLE....";
    $SQL "INSERT INTO ....";

        return 
    $SQL;
        } 
    Modalità curioso ON...attendere riavvio del sistema in corso...

    Errore nessuna tastiera trovata premere un tasto per continuare...

  2. #2
    cosi non si capisce ... indica la riga dell'errore e postala per intero (per sicurezza anche quella subito sopra e subito sotto)
    The fastest Redis alternative ... cachegrand! https://github.com/danielealbano/cachegrand

  3. #3
    Perchè la variabile $SQl la definisci due volte come array()?

  4. #4
    allora
    Codice PHP:
    <?
                
    include ('../config/config.php');//questo verrà creato + in giù
                
    include ('../lang/lang.php');

    //crea config.php

    $file "../config/config.php";

    if(isset(
    $_POST['submit'])) {

        
    $SQLuser         $_POST["SQLuser"]; 
        
    $SQLpass         $_POST["SQLpass"]; 
        
    $SQLname         $_POST["SQLname"]; 
        
    $SQLhost         $_POST["SQLhost"];
        
    $SQLprefix         $_POST["SQLpreix"]; 

        
    $content "<?php 
        \$db_user = '
    $SQLuser';\r\n 
        \$db_pass = '
    $SQLpass';\r\n 
        \$db_name = '
    $SQLname';\r\n 
        \$db_host = '
    $SQLhost';\r\n 
        \$prefix  = '
    $SQLprefix';\r\n
        ?>"
    ;

    $fp fopen($file"a"); 
    fwrite($fp$content);
    fclose($fp); 

    } else { 
    echo 
    "$lang[55]";
    }  

         
    $template = new template;

        if ( 
    file_exists('install.lock') )
        {
        
    errore("<link href=\"install/install.css\" align=\"center\" rel=\"stylesheet\" type=\"text/css\">
                       <table width=\"200\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"lock\">
                         <tr>
                       <td>
    $lang[50]</td>
                         </tr></table>"
    );
        exit();
    }

        if (
    $FH = @fopen$root.'install.lock''w' ) )
        {
            @
    fwrite$FH'© Graphic Supremacy');
            @
    fclose($FH);
            
            @
    chmod$root.'install.lock'0666 );
            
            
    $template->print_top('Installazione effettuata!');
            
            
    $msg="$lang[51]";
        }
        else
        {
            
    $template->print_top('completato!');
            
            
    $msg "$lang[52]";
        }
        

    echo (
    "
        <form action=\"install.php\" method=\"POST\" name=\"config\" id=\"InputForm\">
        
    $lang[7]:   <input type=\"text\" name=\"SQLprefix\">
        
    $lang[2]:   <input type=\"text\" name=\"SQLuser\">
        
    $lang[3]:    <input type=\"password\" name=\"SQLpass\">
        
    $lang[4]:    <input type=\"password\" name=\"SQLpass2\">
        
    $lang[5]:    <input type=\"text\" name=\"SQLname\">
        
    $lang[6]:    <input type=\"text\" name=\"SQLhost\">
        
    $lang[2]:    <input type=\"text\" name=\"user\">
        
    $lang[3]:    <input type=\"password\" name=\"pass\">
        
    $lang[4]:    <input type=\"password\" name=\"pass2\">
        
    $lang[24]:    <input type=\"text\" name=\"msn\">
        <input type=\"submit\" name=\"conf\" value=\"
    $lang[9]\">
        </form> "
    );

        if (
    $VARS['pass'] != $VARS['pass2'])
        {
            
    install_error("$lang[54]");
        }


    if (isset (
    $_POST["config"])) {  
    $SQLuser         $_POST["SQLuser"]; 
    $SQLpass         $_POST["SQLpass"]; 
    $SQLname         $_POST["SQLname"]; 
    $SQLhost         $_POST["SQLhost"];
    $SQLprefix         $_POST["SQLpreix"]; 
    $user             $_POST["user"]; 
    $password         $_POST["pass"]; 
    $msn             $_POST["msn"]; 



    $giorno     date("j");
    $mese         =  date("n");
    $anno         date("Y");
    $ore         date("H");
    $minuti     date("i");
    $secondi     date("s");
    $regdate     mktime($ore$minuti$secondi$mese$giorno$anno); 


    $query_user     "SELECT `username` FROM `$prefix$lang[22]` WHERE `username`='" $_POST['user'] . "'";
    $result_user     mysql_query($query_user) or die("Errore:".mysql_error());
    $User_register     mysql_num_rows($result_user);

        if(
    $User_register) {
             die(
    '$lang[53]'); 
            
    function 
    get_sql()
    {

    $SQL = array();

    $SQL[] = "CREATE TABLE `$prefix$lang[21]`..."
    $SQL[] = "CREATE TABLE `$prefix$lang[22]`..."
    $SQL[] = "CREATE TABLE `$prefix$lang[23]`..."

                    
        
    return $SQL;
        }

    ?>
    mi da errore dove c'è ?>

    questi$template = new template; $template->print_top('completato!');

    stanno bene?per come è fatta la pagina?centrano con l'errore?
    Modalità curioso ON...attendere riavvio del sistema in corso...

    Errore nessuna tastiera trovata premere un tasto per continuare...

  5. #5
    Utente di HTML.it L'avatar di gasmor
    Registrato dal
    Apr 2004
    Messaggi
    1,768
    segnala qual'è la riga 168
    Hai provato a creare un sito con Jaaxo Cms PHP5? new!

  6. #6
    168:?>
    Modalità curioso ON...attendere riavvio del sistema in corso...

    Errore nessuna tastiera trovata premere un tasto per continuare...

  7. #7
    ci sono due if non chiuse...

    if (isset ($_POST["config"])) {

    if($User_register) {


    Il silenzio è spesso la cosa migliore. Pensa ... è gratis.

  8. #8
    Utente di HTML.it
    Registrato dal
    May 2005
    Messaggi
    72
    Questo non va lasciato cosi secondo me.....

    $content = "<?php
    \$db_user = '$SQLuser';\r\n
    \$db_pass = '$SQLpass';\r\n
    \$db_name = '$SQLname';\r\n
    \$db_host = '$SQLhost';\r\n
    \$prefix = '$SQLprefix';\r\n
    ?>";
    hai già aperto il tag php e per scrivere nel file una cosa del genere usa

    $content = "<";
    $content.= "php";
    etc etc

    dovrebbe funzionare...prova

  9. #9
    di preciso a che serve questo:
    Codice PHP:
    $template = new template
    ???
    Modalità curioso ON...attendere riavvio del sistema in corso...

    Errore nessuna tastiera trovata premere un tasto per continuare...

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.