PhpDig.net

Go Back   PhpDig.net > PhpDig Forums > Mod Submissions

Reply
 
Thread Tools
Old 09-26-2003, 07:49 AM   #1
yoann
Green Mole
 
Join Date: Sep 2003
Posts: 1
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.
yoann is offline   Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
trouble indexation pdf lolodev External Binaries 0 07-17-2008 12:47 PM
help where I find External Binaries the pdf xls doc gioducati External Binaries 0 08-11-2006 11:28 PM
problem with .pdf and .doc files mleray External Binaries 11 12-09-2004 10:26 PM
xls doc pdf with windows sktest External Binaries 1 02-09-2004 09:47 AM


All times are GMT -8. The time now is 10:34 AM.


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