Bonjour,
J'ai un souci avec ce bout de code :
1 2 3
| $fp = fopen($sourcefile, 'rb');
$content = fread($fp, filesize($sourcefile));
fclose($fp); |
'$content' ne contient pas tout les caractères du fichier 'sourcefile'.
Fichier lu :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89
|
%PDF-1.4
%Çì¢
5 0 obj
<</Length 6 0 R/Filter /FlateDecode>>
stream
xœ•ÍJD1F÷yŠîl„“ô'ÍVqãÐÝàjÔYÝÅŒ¾?v.ŽÞ…‚6”çKzL¢Ïuiö3pØŒ{€#4Jç³€u¿ŸÃm‡›*…aõW`r÷,
“`L-XeÊ¡Ï°‹™jfÖ_0‘åø†“ª»Åwœ”¤–>õ{4äþXýz·8%J^Jt2aOñ„JK|L‰Ù/Ðô3ãWw8LêÙÇ'œŒt¥ó"Íþµ¬$m%mP¨Xá?ý™ýi<Wp×áqÔÊf[endstream
endobj
6 0 obj
209
endobj
4 0 obj
<</Type/Page/MediaBox [0 0 595 842]
/Rotate 0/Parent 3 0 R
/Resources<</ProcSet[/PDF /Text]
/Font 8 0 R
>>
/Contents 5 0 R
>>
endobj
3 0 obj
<< /Type /Pages /Kids [
4 0 R
] /Count 1
>>
endobj
1 0 obj
<</Type /Catalog /Pages 3 0 R
/Metadata 9 0 R
>>
endobj
8 0 obj
<</R7
7 0 R>>
endobj
7 0 obj
<</BaseFont/Times-Roman/Type/Font
/Subtype/Type1>>
endobj
9 0 obj
<</Type/Metadata
/Subtype/XML/Length 1692>>stream
<?xpacket begin='' id='W5M0MpCehiHzreSzNTczkc9d'?>
<?adobe-xap-filters esc="CRLF"?>
<x:xmpmeta xmlns:x='adobe:ns:meta/' x:xmptk='XMP toolkit 2.9.1-13, framework 1.6'>
<rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns:iX='http://ns.adobe.com/iX/1.0/'>
<rdf:Description rdf:about='0b11d82f-4c57-11de-0000-0c16b9e08ffa' xmlns:pdf='http://ns.adobe.com/pdf/1.3/'><pdf:Producer>GPL Ghostscript 8.64</pdf:Producer>
<pdf:Keywords>()</pdf:Keywords>
</rdf:Description>
<rdf:Description rdf:about='0b11d82f-4c57-11de-0000-0c16b9e08ffa' xmlns:xmp='http://ns.adobe.com/xap/1.0/'><xmp:ModifyDate>2009-05-26T15:45:50+02:00</xmp:ModifyDate>
<xmp:CreateDate>2009-05-26T15:45:50+02:00</xmp:CreateDate>
<xmp:CreatorTool>\376\377\000P\000D\000F\000C\000r\000e\000a\000t\000o\000r\000 \000V\000e\000r\000s\000i\000o\000n\000 \0000\000.\0009\000.\0008</xmp:CreatorTool></rdf:Description>
<rdf:Description rdf:about='0b11d82f-4c57-11de-0000-0c16b9e08ffa' xmlns:xapMM='http://ns.adobe.com/xap/1.0/mm/' xapMM:DocumentID='0b11d82f-4c57-11de-0000-0c16b9e08ffa'/>
<rdf:Description rdf:about='0b11d82f-4c57-11de-0000-0c16b9e08ffa' xmlns:dc='http://purl.org/dc/elements/1.1/' dc:format='application/pdf'><dc:title><rdf:Alt><rdf:li xml:lang='x-default'>\376\377\000t\000e\000s\000t</rdf:li></rdf:Alt></dc:title><dc:creator><rdf:Seq><rdf:li>\376\377\000s\000n\0003\0003\0009\0003\0003\0007</rdf:li></rdf:Seq></dc:creator><dc:description><rdf:Seq><rdf:li>()</rdf:li></rdf:Seq></dc:description></rdf:Description>
</rdf:RDF>
</x:xmpmeta>
<?xpacket end='w'?>
endstream
endobj
2 0 obj
<</Producer(GPL Ghostscript 8.64)
/CreationDate(D:20090526154550+02'00')
/ModDate(D:20090526154550+02'00')
/Title(\376\377\000t\000e\000s\000t)
/Creator(\376\377\000P\000D\000F\000C\000r\000e\000a\000t\000o\000r\000 \000V\000e\000r\000s\000i\000o\000n\000 \0000\000.\0009\000.\0008)
/Author(\376\377\000s\000n\0003\0003\0009\0003\0003\0007)
/Keywords()
/Subject()>>endobj
xref
0 10
0000000000 65535 f
0000000513 00000 n
0000002440 00000 n
0000000454 00000 n
0000000313 00000 n
0000000015 00000 n
0000000294 00000 n
0000000606 00000 n
0000000577 00000 n
0000000672 00000 n
trailer
<< /Size 10 /Root 1 0 R /Info 2 0 R
/ID [<47C1F471EF4AF5B9782A12E2E29848CF><47C1F471EF4AF5B9782A12E2E29848CF>]
>>
startxref
2820 |
(X remplace un caractère que je n'ai pas pu coller ici, si ça peut vous donner de idées)
Echo de '$content' :
%PDF-1.4 %Çì¢ 5 0 obj <> stream xÍJD1 F÷yîlô'ÍVqãÐÝàjÔYÝž?v.Þ
6çKz L¢Ïuiö3pØ{#4Jç³u¿Ãm*
aõW`r÷, `L-XeÊ¡Ï°jfÖ_0åøª»Åw¤>õ{4äþýz·8%J^Jt2aOñJK|LÙ/Ðô3ãWw8LêÙÇ't¥ó"Íþµ¬$m%mP¨Xá?ýýi> /Contents 5 0 R >> endobj 3 0 obj << /Type /Pages /Kids [ 4 0 R ] /Count 1 >> endobj 1 0 obj <> endobj 8 0 obj <> endobj 7 0 obj <> endobj 9 0 obj <>stream GPL Ghostscript 8.64 () 2009-05-26T15:45:50+02:00 2009-05-26T15:45:50+02:00 \376\377\000P\000D\000F\000C\000r\000e\000a\000t\000o\000r\000 \000V\000e\000r\000s\000i\000o\000n\000 \0000\000.\0009\000.\0008 \376\377\000t\000e\000s\000t\376\377\000s\000n\0003\0003\0009\0003\0003\0007() endstream endobj 2 0 obj <>endobj xref 0 10 0000000000 65535 f 0000000513 00000 n 0000002440 00000 n 0000000454 00000 n 0000000313 00000 n 0000000015 00000 n 0000000294 00000 n 0000000606 00000 n 0000000577 00000 n 0000000672 00000 n trailer << /Size 10 /Root 1 0 R /Info 2 0 R /ID [<47C1F471EF4AF5B9782A12E2E29848CF><47C1F471EF4AF5B9782A12E2E29848CF>] >> startxref 2820 %%EOF
J'espère que quelqu'un aura une idée de l'origine de mon problème, moi j'ai épuisé ma réserve :s
Merci d'avance.
Partager