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.

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,云上日子,你我共享。...

限时新网有提供5+个免费域名

有在六月份的时候也有分享过新网域名注册商发布的域名促销活动(这里)。这不在九月份发布秋季域名促销活动,有提供年付16元的.COM域名,同时还有5个+的特殊后缀的域名是免费的。对于新网服务商是曾经非常老牌的域名注册商,早年也是有在他们家注册域名的。我们可以看到,如果有针对新用户的可以领到16元的.COM域名。包括还有首年免费的.XYZ、.SHOP、Space等等后缀的域名。除了.COM域名之外的其他...

LOCVPS新上日本软银线路VPS,原生IP,8折优惠促销

LOCVPS在农历新年之后新上架了日本大阪机房软银线路VPS主机,基于KVM架构,配备原生IP,适用全场8折优惠码,最低2GB内存套餐优惠后每月仅76元起。LOCVPS是一家成立于2012年的国人VPS服务商,提供中国香港、韩国、美国、日本、新加坡、德国、荷兰、俄罗斯等地区VPS服务器,基于KVM或XEN架构(推荐选择KVM),线路方面均选择国内直连或优化方案,访问延迟低,适合建站或远程办公使用。...

file_get_contents为你推荐
计算机winrar5ToolgraphCreatedwin7支持ipad孩子applewindows键是哪个Windows快捷键是什么css3按钮html点击按钮怎么弹出一个浮动的窗体css选择器css3的选择器有哪些?kb4012598win7怎么查看电脑是否安装了 ms17 010firefoxflash插件安装火狐浏览器后,老是提示安装flash player?
上海服务器租用 联通vps 东莞电信局 新加坡主机 优惠码 idc测评网 英语简历模板word 日志分析软件 镇江联通宽带 权嘉云 网站木马检测工具 东莞数据中心 广州服务器 电信虚拟主机 英雄联盟台服官网 德隆中文网 七牛云存储 广东服务器托管 机柜尺寸 studentmain 更多