[TYPO3] readfile in extension

Dmitry Dulepov [typo3] dmitry at typo3.org
Thu Jan 17 21:11:59 CET 2008


Hi!

Roberto Torresani wrote:
> I write a extension where I want read a file and write it to the output.
> Now I set the Content-Type and use the php command readfile.
> 
> When I call the page with my extension in the browser, I receive the file
> with at the end the code html of the template in the page.
> How can I send to the browser only the read file and not the rest of the
> typo3page?

Ideal sulotion would be to use eID approach. It does not load the whole [heavy] TYPO3 framework, does not need extra page types (=does not depend on TS & cannot cause typeNum conflicts) and does not produce any default HTML code. You can output the file much faster and easier with eID.

-- 
Dmitry Dulepov
TYPO3 core team
Web: http://typo3bloke.net/
Skype: callto:liels_bugs
"Nothing is impossible. There are only limits to our knowledge"


More information about the TYPO3-english mailing list