hardfile_get_contents

file_get_contents  时间:2021-05-19  阅读:()
RTFtoHTMLconverterVersion1.
2forPHP4and5(including5.
5)requiresionCubeLoader,ZendOptimiser/ZendLoadedorNuSpherePHPExpressConvertingRTFFilestoHTMLUsingRTFtoHTMLconverterRTFtoHTMLConverterisaPHPbasedutilitywhichallowsyoutoconvertRTFdocumentsintoHTMLcode.
ThecodeproducedcanthenbedirectlyoutputtoawebpageorsavedtoaHTMLfile.
TheconvertercanalsoproducesimpleHTMLfromplaintext(PlaintexttoHTMLconverter).
Theconvertersupportsconversionincludingfonts,colours(includingbackgroundcolours),specialcharacters,hyper-linksetc.
TheRTFtoHTMLconvertersystemcomesintwotypesforbothRTFandPlaintext.
Thesearebasicfunctionsandaclassbasedsystem.
1.
Functions1.
1RTFfunctionsTherearetwofunctionsassociatedwiththeconversionofRTF.
1.
1.
1ConvertingastringholdingtheRTFsource:convert_rtf_to_html($rtfdata,$showerrors/*false*/,$showconversiontime/*false*/)Where:$rtfdataisastringcontainingthesourceRTFcode.
$showerrorsisanoptionalBoolean,toindicateifyouwanterrorstobedisplayedattheendoftheconversion.
$showconversiontimeisanoptionalBooleantoaddthetimetakentoconvertthestring,totheendoftheoutput.
Example:require("rtf.
php");$rtf="{";$rtf.
="{}";$rtf.
="{}";$rtf.
="";$rtf.
="";$rtf.
="Iamrichtext}";convert_rtf_to_html($rtf);1.
1.
2LoadingtheRTFfilefromtheharddriverequire("rtf.
php");convert_rtf_file_to_html($file,$showerrors/*false*/,$showconversiontime/*false*/)Where:$fileisastringcontainingthepathandfilenamerelativetothewebserversrootpath.
$showerrorsisanoptionalBoolean,toindicateifyouwanterrorstobedisplayedattheendoftheconversion.
$showconversiontimeisanoptionalBooleantoaddthetimetakentoconvertthestring,totheendoftheoutput.
Example:require("rtf.
php");convert_rtf_file_to_html("documentation/mydocument.
rtf");1.
2PlaintextfunctionsTherearetwofunctionsassociatedwiththeconversionofplaintext.
1.
2.
1Convertingastringholdingtheplaintext:convert_txt_to_html($textdata,$showconvtime/*false*/)Where:$textdataisastringcontainingtheplaintext.
$showconversiontimeisanoptionalBooleantoaddthetimetakentoconvertthestring,totheendoftheoutput.
Example:require("rtf.
php");$text="Iamplaintext";convert_txt_to_html($text);1.
2.
2Loadingthetextfilefromtheharddriveconvert_txt_file_to_html($file,$showconvtime/*false*/)Where:$fileisastringcontainingthepathandfilenamerelativetothewebserversrootpath.
$showconversiontimeisanoptionalBooleantoaddthetimetakentoconvertthestring,totheendoftheoutput.
Example:require("rtf.
php");convert_txt_file_to_html("documentation/mydocument.
txt");2.
Classes2.
1RTFclassTheRTFclasshasabasicsetofmethodstocontrolitsuse.
Thesearelistedbelow2.
1.
1TheclassconstructorRTFConv($rtfdata)Where:$rtfdataisastringcontainingthesourceRTFcode.
2.
1.
2TheoutputtypeSetOutput($type)Where:$typeiseither"dhtml"or"html",where'dhtml'signifiesadynamicoutputi.
e.
theconversionisoutputdirectlyusingprint.
Note:Fontstylesareembeddedintoeachfontelementand'html'(recommended)signifiesthattheoutputisbufferedintoastringthatcanbeoutputusingShowOutputoraccesseddirectly.
2.
1.
3ThedocumentformatUseDocumentFormat($use/*true*/)Where:$useisoptionalandcanbeeithertrueforconvertingthedocumentsettingsorfalseforignoringthem.
ThedocumentsettingsarethewidthandmarginssetusingapplicationssuchasWord.
2.
1.
4Showingerrors(usedinconjunctionwithShowOutput)ShowErrors($show/*true*/)Where:$showisoptionalandcanbeeithertrueforshowinganyerrorswhenusingShowOutput,orfalseforignoringthem.
2.
1.
5SettingtheoutputlevelSetOutputLevel($level)Where:$levelistheamountofformattingrequired:0=noformatting1=basicformattinge.
g.
and2=fullformattingsuchasfontsstylesandtablesDefaultsto2ifnotset.
2.
1.
6ShowthetimetakentoconvertthesourceintheoutputShowConversionTime($showconvtime/*true*/)Where:$showconvtimeisoptionalandcanbeeithertrueforshowingtheconversiontime,orfalseforignoringit.
2.
1.
7ConvertingtheRTFdataConvert()TheConvertmethodwill(dependingontheoutputtype)eitheroutputtoabufferforlateraccessorusebyShowOutput,or,itwilloutputtheconversiondirectlytotheclientusingprint.
2.
1.
7Showingtheoutput(i.
e.
printingittotheclient)ShowOutput($showstyles/*false*/,$file/*""*/)Where:$showstylesisoptionalandcanbeeithertrue(recommended)forshowingthestylesusedforthefonts,orfalseforignoringthem.
$fileisoptionalandcanbethepathandnameofafiletoredirecttheoutputtoe.
g.
"documentation/mynewdocument.
html".
Note:Youcanalsousetheclassvariables:styleswhichholdsthelistoffontstylesneededfortheconvertedRTF.
outwhichholdsthebufferedconversion.
errwhichcontainsanarrayoferrormessagese.
g.
err[0]holdsthefirsterror,err[1]thesecondetc.
.
Example:require("rtf.
php");$r=newRTFConv($rtf);$r->SetOutput("html");$r->ShowConversionTime($showconvtime);$r->ShowErrors(true);$r->Convert();$r->ShowOutput(true);(where$rtfistheRTFdatae.
g.
$rtf=file_get_contents("mydocument.
rtf");2.
2PlaintextclassTheplaintextclasshasabasicsetofmethodstocontrolitsuse.
Thesearelistedbelow2.
2.
1TheclassconstructorPlainTextConv($text)Where:$textisastringcontainingtheplaintexttobeconverted.
2.
2.
2SettingthefonttouseSetFont($font,$fontsize/*12*/)Where:$fontisastandardwebfontsuchas'Arial'tousefortheentireconversion.
$fontsizeisanoptionalsizedefiningthefontsizetousefortheentireconversion.
2.
2.
3ShowthetimetakentoconvertthetextintheoutputShowConversionTime($showconvtime/*true*/)Where:$showconvtimeisoptionalandcanbeeithertrueforshowingtheconversiontime,orfalseforignoringit.
2.
2.
4ConvertingtheplaintextdataConvert()TheConvertmethodwill(dependingontheoutputtype)eitheroutputtoabufferforlateraccessorusebyShowOutput,or,itwilloutputtheconversiondirectlytotheclientusingprint.
2.
2.
5Showingtheoutput(i.
e.
printingittotheclient)ShowOutput($file/*""*/)Where:$fileisoptionalandcanbethepathandnameofafiletoredirecttheoutputtoe.
g.
"documentation/mynewdocument.
html".
Note:Youcanalsousetheclassvariable:outwhichholdsthebufferedconversion.
Example:$r=newPlainTextConv($text);$r->SetFont("Helvetica",10);$r->ShowConversionTime($showconvtime);$r->Convert();$r->ShowOutput();LicenseTHISSOFTWAREISPROVIDEDBYTHEAUTHOR"ASIS"ANDANYEXPRESSORIMPLIEDWARRANTIES,INCLUDING,BUTNOTLIMITEDTO,THEIMPLIEDWARRANTIESOFMERCHANTABILITYANDFITNESSFORAPARTICULARPURPOSEAREDISCLAIMED.
INNOEVENTSHALLTHEAUTHORBELIABLEFORANYDIRECT,INDIRECT,INCIDENTAL,SPECIAL,EXEMPLARY,ORCONSEQUENTIALDAMAGES(INCLUDING,BUTNOTLIMITEDTO,PROCUREMENTOFSUBSTITUTEGOODSORSERVICES;LOSSOFUSE,DATA,ORPROFITS;ORBUSINESSINTERRUPTION)HOWEVERCAUSEDANDONANYTHEORYOFLIABILITY,WHETHERINCONTRACT,STRICTLIABILITY,ORTORT(INCLUDINGNEGLIGENCEOROTHERWISE)ARISINGINANYWAYOUTOFTHEUSEOFTHISSOFTWARE,EVENIFADVISEDOFTHEPOSSIBILITYOFSUCHDAMAGE.
RTFtoHTMLconverterisCopyright2007-2014Pa-software.
Allrightsreserved.

VPSDime7美元/月,美国达拉斯Windows VPS,2核4G/50GB SSD/2TB流量/Hyper-V虚拟化

VPSDime是2013年成立的国外VPS主机商,以大内存闻名业界,主营基于OpenVZ和KVM虚拟化的Linux套餐,大内存、10Gbps大带宽、大硬盘,有美国西雅图、达拉斯、新泽西、英国、荷兰机房可选。在上个月搞了一款达拉斯Linux系统VPS促销,详情查看:VPSDime夏季促销:美国达拉斯VPS/2G内存/2核/20gSSD/1T流量/$20/年,此次推出一款Windows VPS,依然是...

A400互联37.8元/季,香港节点cn2,cmi线路云服务器,1核/1G/10M/300G

A400互联怎么样?A400互联是一家成立于2020年的商家,A400互联是云服务器网(yuntue.com)首次发布的云主机商家。本次A400互联给大家带来的是,全新上线的香港节点,cmi+cn2线路,全场香港产品7折优惠,优惠码0711,A400互联,只为给你提供更快,更稳,更实惠的套餐,香港节点上线cn2+cmi线路云服务器,37.8元/季/1H/1G/10M/300G,云上日子,你我共享。...

Boomer.host:$4.95/年-512MB/5GB/500GB/德克萨斯州(休斯顿)

部落曾经在去年分享过一次Boomer.host的信息,商家自述始于2018年,提供基于OpenVZ架构的VPS主机,配置不高价格较低。最近,主机商又在LET发了几款特价年付主机促销,最低每年仅4.95美元起,有独立IPv4+IPv6,开设在德克萨斯州休斯顿机房。下面列出几款VPS主机配置信息。CPU:1core内存:512MB硬盘:5G SSD流量:500GB/500Mbps架构:KVMIP/面板...

file_get_contents为你推荐
处理器flash更新iosIOJsios8支持ipadgoogle中国地图求教谷歌中国地图~手机如何使用?google中国地图谷歌退出中国,地图要是关了就太可惜了!手机谷歌地图还能用吗?win7关闭135端口如何用命令关闭135端口googleadsense10分钟申请Google Adsense是一种怎样的体验google分析如何添加google analysisrouteadd30分,route add 命令,会的帮我!
php主机空间 二级域名申请 域名备案号查询 enom 堪萨斯服务器 googleapps 512m内存 全能主机 国外代理服务器地址 1g内存 qq对话框 爱奇艺vip免费试用7天 酷番云 免费网页申请 怎么建立邮箱 上海电信测速网站 789 监控服务器 百度云空间 德讯 更多