Visualizzazione dei risultati da 1 a 4 su 4
  1. #1
    Utente di HTML.it
    Registrato dal
    Jun 2002
    Messaggi
    1,476

    [FREEPHP.it - script]Configurare motore di ricerca interno

    Ciao raga,

    non riesco a configurare questo motore di ricerca interno al sito
    http://freephp.html.it/script/view_script.asp?id=392

    non mi indicizza nulla ho inserito i meta tag ecc.. ma non ne vuol sapere di funzionare.

    chiedo lumi a chi è riuscito a farlo andare.


    dies

  2. #2
    Utente di HTML.it
    Registrato dal
    Jun 2002
    Messaggi
    1,476
    non riesco a superare questo problema.

    se seleziono "CREATE INDEX" e poi clicco "SUBMIT" mi da la possibilità di scegliere se indicizzare con i META TAG o tutto il testo.. se clicco una delle due opzini mi da questo messaggio:

    No files in the specified directory were available for indexing.



    eppure se l'inserisco manualmente le indicizzazioni nel file search_index.dat... funziona!



    grazie

    dies

  3. #3
    Utente di HTML.it
    Registrato dal
    Jun 2002
    Messaggi
    1,476
    questa è la funzione

    Codice PHP:
    function i_index_site() {
     
    // Indexes the site & writes it to file.
     
    if (!isset($GLOBALS[s])) {
      echo 
    "

    <div align=\"center\">
    <h4>You have selected to index your site.</h4>
    You can index your site using meta tag \"keywords\" or you can perform a \"full\" index.

    Which action do you wish to perform?


    <table border=\"0\"><tr>
    <td align=\"center\"><form method=\"post\"><input type=\"hidden\" name=\"index\"><input type=\"hidden\" name=\"action\" value=\"index_site\"><input type=\"hidden\" name=\"s\" value=\"submit_meta\"><input type=\"hidden\" name=\"username\" value=\"
    $GLOBALS[username]\"><input type=\"hidden\" name=\"password\" value=\"$GLOBALS[password]\"><input type=\"submit\" value=\"Meta Tag Index\"></form></td>
    <td align=\"center\"><form method=\"post\"><input type=\"hidden\" name=\"index\"><input type=\"hidden\" name=\"action\" value=\"index_site\"><input type=\"hidden\" name=\"s\" value=\"submit_full\"><input type=\"hidden\" name=\"username\" value=\"
    $GLOBALS[username]\"><input type=\"hidden\" name=\"password\" value=\"$GLOBALS[password]\"><input type=\"submit\" value=\"Full Index\"></form></td>
    </tr></table></div>"
    ;
     }
     else {
      if (
    is_dir($GLOBALS[file_root])) {
       
    $file_array i_get_files($GLOBALS[file_root]);
       
    $file_array i_strip_extentions($file_array);
       
    $file_array i_strip_files($file_array);
       if(
    is_array($file_array)) {
        
    set_time_limit(0);
        
    $fd = @fopen($GLOBALS[index_file], "w") or die("<h3 align=\"center\">$GLOBALS[err_index]</h3>");
        foreach (
    $file_array as $file) {
         if ((
    $GLOBALS[s] == "submit_full") || (substr($file, -3) == "txt")) $line i_full_index_file($file);
         elseif (
    $GLOBALS[s] == "submit_meta")$line i_meta_index_file($file);
         if (
    substr_count($line"|") > 1fputs($fd"$line\n");
        }
        
    fclose($fd);
        echo 
    "<h3 align=\"center\">$GLOBALS[index_complete]</h3>";
       }
       else {
        echo 
    "<h3 align=\"center\">$GLOBALS[no_files]</h3>";
       }
      }
      else {
       echo 
    "<h3 align=\"center\">$GLOBALS[no_dir]</h3>";
      } 
     }

    può essere un problema di variabili GLOBALI?




    dies

  4. #4
    Utente di HTML.it
    Registrato dal
    Jun 2002
    Messaggi
    1,476
    il problema è che non indicizza la root del sito; mentre funziona alla perfezione sulle CARTELLE della root.


    queste sono le variabili in gioco:
    Codice PHP:
    // Variables

    // Set your username and password. Leave blank if you don't want any protection.
           
    $user "UserName";
           
    $pass "Password";

    // The full system path to the files you wish to index. DO NOT include trailing slash.
           
    $file_root "c:\\html";

    // The URL equivilent of the above. DO NOT include trailing slash.
           
    $http_root "http://www.example.com";

    // The full system path to the index file.
           
    $index_file "c:\\html\\sitesearch\\search_index.dat";

    // The full system path to the file of words to exclude.
           
    $exclude_words "c:\\html\\sitesearch\\exclude_words.txt";

    // The full system path to the file of files to exclude.
           
    $exclude_files "c:\\html\\sitesearch\\exclude_files.txt"
    come si può risolvere?


    dies

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 © 2026 vBulletin Solutions, Inc. All rights reserved.