PhpDig.net

PhpDig.net (http://www.phpdig.net/forum/index.php)
-   Mod Submissions (http://www.phpdig.net/forum/forumdisplay.php?f=24)
-   -   indexation pdf doc et xls (http://www.phpdig.net/forum/showthread.php?t=95)

yoann 09-26-2003 07:49 AM

indexation pdf doc et xls
 
Dans le fichier « robot_functions.php » remplacer la partie de code :

$file_content = @file($uri);
if (!is_dir($prefix)) {
if (!@mkdir($prefix,0660)) {
die("Unable to create temp directory\n";);
}
}
$tempfile = $prefix.$temp_filename;
$f_handler = fopen($tempfile,'wb');
if (is_array($file_content)) {
fwrite($f_handler,implode('',$file_content));
}
fclose($f_handler);
$tempfilesize = filesize($tempfile);


par:


# $file_content = @file($uri);
$handle = fopen ($uri,"rb";);
$file_content = "";
do {
$data = fread($handle,8192);
if (strlen($data) == 0) { break; }
$file_content .= $data;
} while(true);
fclose($handle);

# if (!is_dir($prefix)) {
# if (!@mkdir($prefix,0660)) {
# die("Unable to create temp directory\n";);
# }
# }
$tempfile = $prefix.$temp_filename;
$f_handler = fopen($tempfile,"wb";);

fwrite($f_handler,$file_content);

# if (is_array($file_content)) {
# fwrite($f_handler,implode('',$file_content));
# }
fclose($f_handler);
$tempfilesize = filesize($tempfile);

Cette manipulation m'a permis l'indexation de mes fichiers xls, pdf et doc.


All times are GMT -8. The time now is 11:44 PM.

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright © 2001 - 2005, ThinkDing LLC. All Rights Reserved.