Avatar billede Slettet bruger
10. december 2001 - 11:46 Der er 19 kommentarer og
1 løsning

Parse error...

Hejsa.. den siger

Parse error: parse error in search.php on line 139

Hvorfor? Hvis jeg retter på }, så poster den bare hele koden.. Hvad er der galt her?

Scriptet kommer fra http://www.eksperten.dk/spm/143567

Her er Scriptet:

<html>
<head>
  <title>sitename - Søgeresultater</title>
</head>
<body>
<table align=center><tr><td>


// Variables

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

// The full system path to the files you wish to index. DO NOT include trailing slash.
      $file_root = \"http://localhost/Navision.dk\";

// The URL equivilent of the above. DO NOT include trailing slash.
      $http_root = \"http://localhost/Navision.dk\";

// The full system path to the index file.
      $index_file = \"http://localhost/Navision.dk/search_index.dat\";

// The full system path to the file of words to exclude.
      $exclude_words = \"http://localhost/Navision.dk/exclude_words.txt\";

// The full system path to the file of files to exclude.
      $exclude_files = \"http://localhost/Navision.dk/exclude_files.txt\";

// Set to true if you wish the time taken to be displayed when searching, false otherwise:

      $show_time_search = true;

// Displays time taken when indexing if true:

      $show_time_index = true;

// The array file file extentions to index. The extentions must be readable (no exe, jpg, gif)
      $include_extentions = array(\'html\',\'htm\',\'shtml\',\'shtm\', \'php\', \'php3\', \'phtml\', \'php4\');

// Message variables:
      $err_no_results = \"Ingen søgeresultater fundet - Prøv venligst igen...\";
      $err_no_search_db = \"Could not find search database<br>Contact the administrator of this site.\";
      $err_index = \"The index file could not be opened.<br><i>Check the path and permissions and try again.</i>\";
      $index_complete = \"Your site has been indexed.\";
      $index_cleared = \"Your site index has been cleared.<br>No search results will be found until you re-index your site.\";
      $no_files = \"No files in the specified directory were available for indexing.\";
      $no_dir = \"The directory you specified cannot be found.\";

// Sets the version.
      $version = \"1.7.4\";

// Sets start time.
$timeparts = explode(\" \",microtime());
$starttime = $timeparts[1].substr($timeparts[0],1);

if (isset($query)) s_control($query);
elseif (substr($QUERY_STRING,0,5) == \"admin\") i_control();
else s_print_search_form(\"\");
c_print_footer();


function s_control($q) {
$orig = $q;
$result_arr = s_search($q);
$result_count = sizeof($result_arr);
if ($result_count < 1) {
  echo \"&nbsp;&nbsp;<a href=\\\"../content.phtml?id=1\\\" class=\\\"lightbluelink\\\"><< Til indexsiden</a><br><br>&nbsp;&nbsp;<font class=\\\"txtbolddarkblue\\\">$GLOBALS[err_no_results]</font>\";
  s_print_search_form($q);
}
else {
  echo \"
&nbsp;&nbsp;<a href=\\\"../content.phtml?id=1\\\" class=\\\"lightbluelink\\\">>> Til indexsiden</a><br><br>&nbsp;&nbsp;<font class=\\\"txtbolddarkblue\\\">Hits: 1 - $result_count for søgning: \\\"$orig\\\"<br></font>
<ol class=\\\"txt\\\">\";

foreach ($result_arr as $result)
  s_print_title_desc($result);

  echo \"</ol>\";
  s_print_search_form($orig);
}
}

function s_search($query) {
// Searches for query in the index file.
// Multiple word search originally contributed by Matthew Furister <matt@agtown.com>
$query = trim(strtolower(c_strip_chars($query)));
$search_data = @file($GLOBALS[index_file]) or die(\"<font class=\\\"txtdarkboldblue\\\" align=\\\"center\\\">$GLOBALS[err_no_search_db]</font>\");
$pages_found = \" \";
foreach ($search_data as $search_page) {
  $page_arr = explode(\"|\", $search_page);
  $found_count = 0;
  $qry_array = split(\'[, ]+\',trim(strtolower($query)));
  foreach ($qry_array as $qry) {
  if (in_array($qry, $page_arr)) {
    ++$found_count;
    $pages_found .= $page_arr[0] . \" \";
  }
  }
  if ($found_count == count($qry_array)) $result_arr[] = $page_arr[0];
}
return $result_arr;
}

function s_print_title_desc($file_n) {
$file = @file($file_n);
if ($file) {
  $line_complete = implode(\'\', $file);
//  eregi(\"<title>(.*)</title>\", $line_complete, $out);
//  $title = trim($out[1]);
  if($title) $line_complete = str_replace($title, \"\", $line_complete);
  $line_complete = strip_tags($line_complete);
  $line_complete = trim($line_complete);
  $line_complete = trim(substr($line_complete, 0, 400));
  $file_n = str_replace(\".inc.phtml\", \"\", $file_n);
  $file_n = str_replace(\"http://\", \"hest&&&\", $file_n);
  $file_n = str_replace(\"/\", \"/content.phtml?id=\", $file_n);
  $file_n = str_replace(\"hest&&&\", \"http://\", $file_n);
  echo \"<li><b><a href=\\\"$file_n\\\" class=\\\"lightbluelink\\\">\";
  if (isset($title))
  echo \"$title</a></b> <font size=\\\"-1\\\">- <i>$file_n</i></font>\";
  else
  echo \"$file_n</a></b>\";
  echo \"<br><font class=\\\"txt\\\">$line_complete...\\n</font><br>&nbsp;\";
}
else {
  echo \"<li><a href=\\\"$file_n\\\" class=\\\"lightbluelink\\\"><b>$file_n</b></a><br>...\";
}
}

function s_print_search_form($query) {
// Function to print the search form.
?>
<div align=\"center\"><form method=\"post\">
<font class=\"txtbolddarkblue\">Søg efter:</font><br><br>
<input type=\"text\" name=\"query\" value=\"<?php echo $query ?>\" class=\"field\">&nbsp;<input type=\"submit\" value=\"Søg!\" class=\"button\">
</form></div>
<?php
}
function i_control() {
global $action, $username, $password, $user, $pass;
if (($user == $username) && ($pass == $password)) {
  if ($action == \"clear_index\") i_clear_index();
  elseif ($action == \"view_index\") i_view_index();
  elseif ($action == \"index_site\") i_index_site();
  i_print_options();
}
else {
  if (($username == \"\") && ($password == \"\")) i_print_logon(\"\");
  else i_print_logon(\"<font class=\\\"txtdarkboldblue\\\">Invalid username and/or password.</font>\");
}
}

function i_index_site() {
// Indexes the site & writes it to file.
if (!isset($GLOBALS[s])) {
  echo \"
<br><div align=\\\"center\\\">
<font class=\\\"txt\\\">You have selected to index you site.</font>
<font class=\\\"txt\\\">You can index you site by it meta tag \\\"keyword\\\" or you can perform a \\\"full\\\" index.
<br>Which action do you wish to perform?</font>
<br><br><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\\\" class=\\\"button\\\"></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=\\\"&nbsp;Full Index&nbsp;\\\" class=\\\"button\\\"></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(\"<font class=\\\"txtdarkboldblue\\\" align=\\\"center\\\">$GLOBALS[err_index]</font>\");
    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, \"|\") > 1) fputs($fd, \"$line\\n\");
    }
    fclose($fd);
    echo \"<font class=\\\"txtdarkboldblue\\\" align=\\\"center\\\">$GLOBALS[index_complete]</font>\";
  }
  else {
    echo \"<font class=\\\"txtdarkboldblue\\\" align=\\\"center\\\">$GLOBALS[no_files]</font>\";
  }
  }
  else {
  echo \"<font class=\\\"txtdarkboldblue\\\" align=\\\"center\\\">$GLOBALS[no_dir]</font>\";
  }
}
}

function i_full_index_file($file_name) {
// Retrieves a list of keywords from a file.
global $http_root, $file_root;
$file_contents = @file($file_name);
if ($file_contents) {
  $SURL = str_replace($file_root, $http_root , $file_name);
  $keywords = \"$SURL|\";
  $file_contents = implode(\" \", $file_contents);
  $file_contents = strip_tags($file_contents);
  $file_contents = strtolower($file_contents);
  $file_contents = str_replace(\"\\n\", \"\", $file_contents);
  $file_contents = c_strip_chars($file_contents);
  $file_contents = str_replace(\",\", \"\", $file_contents);
  $file_contents = explode(\" \", $file_contents);
  foreach($file_contents as $word) {
  $word = trim($word);
  if ($word != \"\") {
    $keywords .= \"$word|\";
  }
  }
}
$complete = str_replace(\"|||\", \"|\", $keywords);
$complete = str_replace(\"||\", \"|\", $complete);
$complete = i_strip_words($complete);
return $complete;
}

function i_meta_index_file($file) {
// Indexes a page by it\'s meta tags.

global $index_file, $http_root, $file_root;
$SURL = str_replace($file_root, $http_root , $file);
$mt = @get_meta_tags($file);
$line = $mt[keywords];
if ($line) {
  $line = explode(\",\", $line);
  foreach ($line as $word) {
  $word = trim($word);
  if ($word != \"\") {
    $keywords .= \"$word|\";
  } 
  }
  $keyword = str_replace(\",\", \"\", $keywords);
  $keywords = c_strip_chars($keywords);
  $keywords = i_strip_words($keywords);
  $keywords = \"$SURL|$keywords\";
  return $keywords;
}
else {
  return \"$SURL|\";
}
}

function i_get_files($dirname) {
// Navigates through the directories recurrsively and retrieves a listing in an array.
// File permission bit by Abhay Jain <vigya@yahoo.com>

if($dirname[strlen($dirname)-1] != \"/\") $dirname.=\"/\";
static $result_array = array();
$mode = fileperms($dirname);
if(($mode & 0x4000) == 0x4000 && ($mode & 0x00004) == 0x00004) {
  chdir($dirname);
  $handle = @opendir($dirname);
}
if($handle) {
  while ($file = readdir($handle)) {
  if($file==\'.\'||$file==\'..\') continue;
    if(is_dir($dirname.$file)) i_get_files($dirname.$file.\'/\');
    else $result_array[] = $dirname.$file;
  }
  closedir($handle); 
}
return $result_array;
}

function i_strip_extentions($array) {
// Runs through the extention array and
// returns all files with the selected extentions.
global $include_extentions;
if(is_array($array)) {
  foreach ($include_extentions as $ext) {
  $str_len = strlen($ext);
  foreach ($array as $file) {
    if (substr($file, -$str_len) == $ext) $result_array[] = $file;
  }
  }
  return $result_array;
}
else return $array;
}

function i_strip_files($array) {
// Removes unwanted files from an array.
global $file_root, $exclude_files;
if(is_array($array)) {
  $exclude = @file($exclude_files);
  if ($exclude) {
  foreach($exclude as $exc_file) {
    $exc_file = trim($exc_file);
    $file[] = $exc_file;
  }
  foreach ($array as $act_file) {
    $act_file = str_replace($file_root, \"\", $act_file);
    if (!in_array($act_file, $file)) $result_array[] = \"$file_root$act_file\";
  }
  return $result_array;
  }
  else return $array;
}
else return $array;
}

function i_strip_words($line) {
$file = @file($GLOBALS[\'exclude_words\']);
if ($file) {
  foreach ($file as $word) {
  $word = trim($word);
  $word = \"|$word|\";
  $line = str_replace(\"$word\", \"|\", $line); 
  }
}
return $line;
}
function i_clear_index() {
// Checks for a confirmation and then clears the index file.
global $username, $password;
if ($GLOBALS[\'s\'] == \"submit\") {
  $fd = @fopen($GLOBALS[index_file], \"w\") or die(\"<font class=\\\"txtdarkboldblue\\\" align=\\\"center\\\">$GLOBALS[err_index]</font>\");
  fclose($fd);
  echo \"<font class=\\\"txtdarkboldblue\\\" align=\\\"center\\\">$GLOBALS[index_cleared]</font>\";
}
else {
  echo \"
<br><center><font class=\\\"txt\\\">
<b>You have selected to clear your site index.</b>
<br>No search results will be found until you re-index your site.
<br>Are you sure?
<br><form method=\\\"post\\\">
<input type=\\\"hidden\\\" name=\\\"action\\\" value=\\\"clear_index\\\">
<input type=\\\"hidden\\\" name=\\\"s\\\" value=\\\"submit\\\">
<input type=\\\"hidden\\\" name=\\\"username\\\" value=\\\"$username\\\">
<input type=\\\"hidden\\\" name=\\\"password\\\" value=\\\"$password\\\">
<input type=\\\"hidden\\\" name=\\\"index\\\">
<input type=\\\"submit\\\" value=\\\"&nbsp;&nbsp;Yes&nbsp;&nbsp;\\\" class=\\\"button\\\"></form>
</font></center>\";
}
}

function i_view_index() {
// Displays the index file in a table.
$file = @file($GLOBALS[index_file]);
if ($file) {
  echo \"
<br><br><font class=\\\"txtdarkboldblue\\\" align=\\\"center\\\">Your index file:</font>
<table style=\\\"font-size:11; font-face:verdana\\\" border=\\\"1\\\" bordercolor=\\\"black\\\" cellpadding=\\\"2\\\" cellspacing=\\\"0\\\" bgcolor=\\\"#DDDDDD\\\">
<tr>
  <td nowrap align=\\\"center\\\" valign=\\\"top\\\"><b>#</b></td>
  <td nowrap align=\\\"center\\\" valign=\\\"top\\\"><b>URL</b></td>
  <td nowrap align=\\\"center\\\" valign=\\\"top\\\"><b>Keywords</b></td></tr>\";
  foreach ($file as $key => $line) {
  $exp_line = explode(\"|\", $line);
  $key = $key + 1;
  echo \"  <td>$key</td>\\n\";
  foreach ($exp_line as $key => $word) {
    if ($key == 0) { echo \"  <td bgcolor=\\\"#FFFFFF\\\" nowrap><a href=\\\"$word\\\" class=\\\"lightbluelink\\\">$word</a></td>\\n  \"; }
    else { echo \"<td nowrap bgcolor=\\\"#FFFFFF\\\">$word</td>\"; }
  }
  echo \" \\n</tr>\\n\";
  }
  echo \"</table>\";
}
else { echo \"<font class=\\\"txtdarkboldblue\\\" align=\\\"center\\\">$GLOBALS[err_index]</font>\"; }
}

function i_print_options() {
// Prints the indexer options.
global $username, $password;
echo \"
<br><br><form method=\\\"post\\\"><table border=\\\"0\\\" align=\\\"center\\\"><tr><td colspan=\\\"2\\\" align=\\\"left\\\" valign=\\\"top\\\"><font class=\\\"txtbolddarkblue\\\"><b>Indexer Options:</b></font></td></tr>
<tr><td valign=\\\"top\\\"><input type=\\\"radio\\\" name=\\\"action\\\" value=\\\"index_site\\\"><font class=\\\"txt\\\" size=\\\"-1\\\">Create Site Index</font></td></tr>
<tr><td valign=\\\"top\\\"><input type=\\\"radio\\\" name=\\\"action\\\" value=\\\"view_index\\\"><font class=\\\"txt\\\" size=\\\"-1\\\">View Site Index</font></td></tr>
<tr><td valign=\\\"top\\\"><input type=\\\"radio\\\" name=\\\"action\\\" value=\\\"clear_index\\\"><font class=\\\"txt\\\" size=\\\"-1\\\">Clear Site Index</font></td></tr>
<tr><td colspan=\\\"2\\\" align=\\\"left\\\" valign=\\\"top\\\"><input type=\\\"hidden\\\" name=\\\"username\\\" value=\\\"$username\\\"><input type=\\\"hidden\\\" name=\\\"password\\\" value=\\\"$password\\\"><input type=\\\"hidden\\\" name=\\\"index\\\"><input type=\\\"submit\\\" value=\\\"Submit\\\" class=\\\"button\\\"></td></tr></table></form>\";
}

function i_print_logon($msg) {
// Prints the indexer logon.
echo \"
<form method=\\\"post\\\"><center><font class=\\\"txtbolddarkblue\\\"><b>$msg</b><br><br></font></center>
<table border=\\\"0\\\" align=\\\"center\\\"><tr><td colspan=\\\"2\\\" align=\\\"center\\\"><font class=\\\"txt\\\"><b>Logon:</b></font></td></tr><tr><td><font class=\\\"txt\\\">Username:</font></td><td><input type=\\\"text\\\" class=\\\"field\\\" name=\\\"username\\\"></td></tr>
<tr><td><font class=\\\"txt\\\">Password:</font></td><td><input type=\\\"password\\\" name=\\\"password\\\" class=\\\"field\\\"></td></tr>
<tr><td></td><td><input type=\\\"hidden\\\" name=\\\"index\\\"><input type=\\\"submit\\\" value=\\\"Logon\\\" class=\\\"button\\\"></td></tr></table></form>\";
}

function c_strip_chars($line) {
// Strips various characters from $line.
$line = str_replace(\".\", \" \", $line);
$line = str_replace(\"\\\"\", \" \", $line);
$line = str_replace(\"\'\", \"\", $line);
$line = str_replace(\"+\", \" \", $line);
$line = str_replace(\"-\", \" \", $line);
$line = str_replace(\"*\", \" \", $line);
$line = str_replace(\"/\", \" \", $line);
$line = str_replace(\"!\", \" \", $line);
$line = str_replace(\"%\", \" \", $line);
$line = str_replace(\">\", \" \", $line);
$line = str_replace(\"<\", \" \", $line);
$line = str_replace(\"^\", \" \", $line);
$line = str_replace(\"(\", \" \", $line);
$line = str_replace(\")\", \" \", $line);
$line = str_replace(\"[\", \" \", $line);
$line = str_replace(\"]\", \" \", $line);
$line = str_replace(\"{\", \" \", $line);
$line = str_replace(\"}\", \" \", $line);
$line = str_replace(\"\\\\\", \" \", $line);
$line = str_replace(\"=\", \" \", $line);
$line = str_replace(\"$\", \" \", $line);
$line = str_replace(\"#\", \" \", $line);
$line = str_replace(\"?\", \" \", $line);
$line = str_replace(\"~\", \" \", $line);
$line = str_replace(\":\", \" \", $line);
$line = str_replace(\";\", \" \", $line);
$line = str_replace(\"_\", \" \", $line);
$line = str_replace(\"  \", \" \", $line);
$line = str_replace(\"&amp\", \" \", $line);
$line = str_replace(\"&copy\", \" \", $line);
$line = str_replace(\"&nbsp\", \" \", $line);
$line = str_replace(\"&quot\", \" \", $line);
$line = str_replace(\"&\", \" \", $line);
$line = str_replace(\"\\n\", \" \", $line);
return $line;
}

function c_print_footer() {
// Prints the footer of the page.
echo \"
<div align=\\\"center\\\">
<font class=\\\"txt\\\"><b>Powered by <a href=\\\"http://php.warpedweb.net/\\\" class=\\\"lightbluelink\\\">PHPSiteSearch</a></b>
<br>Version $GLOBALS[version]</font></div>\";
}

// Display time taken.

if(isset($query)) {
if($show_time_search) {
  $timeparts = explode(\" \",microtime());
  $total_time = ($timeparts[1].substr($timeparts[0],1)) - $starttime;
  echo \"<br><center><font class=\\\"txt\\\">(Søgningen tog: \".substr($total_time,0,4).\" sekunder)</font><br><br></center>\";
}
}
elseif (substr($QUERY_STRING,0,5) == \"admin\") {
if($show_time_index) {
  $timeparts = explode(\" \",microtime());
  $total_time = ($timeparts[1].substr($timeparts[0],1)) - $starttime;
  echo \"<br><center><font class=\\\"txt\\\">(Handlingen tog: \".substr($total_time,0,4).\" sekunder)</font><br></center>\";
}
}

?>
  </td></tr></table>
</body>
</html>
Avatar billede retep Nybegynder
10. december 2001 - 12:03 #1
Du mangler i hvert fald en <?
i starten af filen...

Mellem
<table align=center><tr><td>
og

// Variables

Dvs:

<table align=center><tr><td>
<?

// Variables


Mvh
Retep
Avatar billede retep Nybegynder
10. december 2001 - 12:07 #2
Og du skal ikke rette i } i linie 139

:)
Avatar billede Slettet bruger
10. december 2001 - 12:07 #3
Ja..

Well spotted! :)

Avatar billede Slettet bruger
10. december 2001 - 12:09 #4
hmm... Når jeg søger efter noget siger den:

Could not find search database
Contact the administrator of this site.

Hvordan opretter jeg den, kan du lure den?
Avatar billede Slettet bruger
10. december 2001 - 12:19 #5
Man skal have ?index i efter fil navn

search.php?index

men det funker ikke..
Avatar billede retep Nybegynder
10. december 2001 - 12:22 #6
Den kommer med fejlen fordi den ikke kan finde:

$index_file = \"http://localhost/Navision.dk/search_index.dat\";

Hvad der skal være i filen ved jeg ikke, men i det eksempel du har i dit tidligere spørgsmål, linkes der direkte til filen...

Dvs. ikke via http...
Avatar billede Slettet bruger
10. december 2001 - 12:28 #7
Nu står der:

// The full system path to the files you wish to index. DO NOT include trailing slash.
      $file_root = \"/home/wowern.dk/wwwroot/navision.dk\";

// The URL equivilent of the above. DO NOT include trailing slash.
      $http_root = \"http://www.wowern.dk/navision.dk\";

// The full system path to the index file.
      $index_file = \"http://www.wowern.dk/nasision.dksearch_index.dat\";

// The full system path to the file of words to exclude.
      $exclude_words = \"http://www.wowern.dk/navision.dk/exclude_words.txt\";

// The full system path to the file of files to exclude.
      $exclude_files = \"http://www.wowern.dk/navision.dk/exclude_files.txt\";


Og det ligger her:

http://www.wowern.dk/navision.dk/search.php?index

men det funker stadig ikke...?
Avatar billede retep Nybegynder
10. december 2001 - 12:28 #8
Har du kigget på denne her?

http://php.warpedweb.net/sitesearch/readme.html

(Der kan du også se hvordan du skal linke til filerne... )
Avatar billede Slettet bruger
10. december 2001 - 12:30 #9
har lige sat en / i

// The full system path to the index file.
      $index_file = \"http://www.wowern.dk/nasision.dk/search_index.dat\";
Avatar billede Slettet bruger
10. december 2001 - 12:30 #10
og rettet s til v ...
Avatar billede Slettet bruger
10. december 2001 - 12:32 #11
Ja.. Den sidder jeg med...

Jeg kan umiddelbart ikke se nogle fejl? kan du?

med mindre at Equivilent URL  skal være Ip?
Avatar billede Slettet bruger
10. december 2001 - 12:34 #12
og dog..

det skal vel være?

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

// The full system path to the files you wish to index. DO NOT include trailing slash.
      $file_root = \"/home/wowern.dk/wwwroot/navision.dk\";

// The URL equivilent of the above. DO NOT include trailing slash.
      $http_root = \"http://www.wowern.dk/navision.dk\";

// The full system path to the index file.
      $index_file = \"/home/wowern.dk/wwwroot/navision.dk/search_index.dat\";

// The full system path to the file of words to exclude.
      $exclude_words = \"/home/wowern.dk/wwwroot/navision.dk/exclude_words.txt\";

// The full system path to the file of files to exclude.
      $exclude_files = \"/home/wowern.dk/wwwroot/navision.dk/exclude_files.txt\";
Avatar billede retep Nybegynder
10. december 2001 - 12:39 #13
Kan ikke lige umiddelbart se nogle fejl...

Har du husket chmod 777 search_index.dat ??
Avatar billede Slettet bruger
10. december 2001 - 12:41 #14
Jepsen!

Det er ligesom om den ikke \"fanger\" eller \"kan se\" at der er skrevet ?index i toppen.
Avatar billede Slettet bruger
10. december 2001 - 13:05 #15
Hmm.. Nu kan den.. Dvs. jeg har lige hentet en ny version på deres hjemmeside...

Jeg roder lige med det lidt..

Tak indtil nu...
Avatar billede Slettet bruger
10. december 2001 - 13:20 #16
Sådan.. nu kan man lave index og søge osv...

men når man søger kommer der en :

Warning: The length of the needle must not be 0 in /home/wowern.dk/wwwroot/navision.dk/search.php on line 156

prøv at søge på ex 2001

http://www.wowern.dk/navision.dk
Avatar billede retep Nybegynder
10. december 2001 - 13:27 #17
Hmmm... Du kan altid prøve at undertrykke din warning ved at sætte et @ foran funktionen der laver fejlen... Men det er selvfølgelig ikke den pæneste løsning... Men hvis det ellers virker er det da en løsning ;)
Avatar billede Slettet bruger
10. december 2001 - 13:47 #18
Ok...

hmm.. De sider den viser fint nok, har PRÆCIS samme head og JS i toppen..

så hvorfor faen er det kun nogle af dem der er warnings på?
Avatar billede Slettet bruger
11. december 2001 - 09:08 #19
Nå... Ved ikke helt hvad jeg gjorde, men nu virker det i hvert fald. :)
Avatar billede retep Nybegynder
11. december 2001 - 12:31 #20
Super ;))
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
Vi tilbyder markedets bedste kurser inden for webudvikling

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester