怎样定制intraweb的错误页面

IntraWeb程序发生错误时,会跳出ATOZED公司的页面,使我们的程序看起来不是那么专业了。下面是摘自网络的文章:
How to customize the error screen in Intraweb
In order to have Intraweb display your error page instead of the default one, you must take the following steps:

Create a file named "IWError.html"
Fill it with something like this:

<html>
     <head><title>Da error is in da house</title></head>
     <body>
         <p align="center"><img src="{%ATOZEDLOGO%}">
         <p>
         <h3>Beware the mighty error!!!</h3>
     </body>
 </html>

Place IWError.html in the application "Templates" folder.
Use the following placeholders inside, wherever you want them:


 {%ATOZEDLOGO%} to display the Atozed logo
 {%INTRAWEBLOGO%} to display the Intraweb logo
 {%CONTENT%} to display the exception message
 {%APPADDRESS%} to display the application address
 {%EXCEPTIONSPECIFIC%} to display an exception specific explanation (only a few are defined)
 {%APPNAME%} to display the application name


 Do not use single quotes
The file IWError.html is output via Javascript. Make sure you don't have single quotes in it, or else you'll end in a Javascript error.

------------------------------------------------------------------------------------------------
怎样定制intraweb的错误页面。
为了使intraweb显示你的错误页面,而不是默认的,你必须安照下面几个步骤:

创建一个命名为"IWError.html"的文件
在里面写入如下代码:
<html>
     <head><title>Da error is in da house</title></head>
     <body>
         <p align="center"><img src="{%ATOZEDLOGO%}">
         <p>
         <h3>Beware the mighty error!!!</h3>
     </body>
 </html>

 把IWError.html放到工程的"Templates"文件夹中.
 你可以在任何地方使用下面的占位符({%%})中的文字(使用时要包括{%%})

 {%ATOZEDLOGO%} 显示Atozed的标志logo
 {%INTRAWEBLOGO%} 显示Intraweb的标志logo
 {%CONTENT%} 显示例外消息
 {%APPADDRESS%} 显示应用程序地址(url地址)
 {%EXCEPTIONSPECIFIC%} 显示例外的详细说明(只有一些被定义)
 {%APPNAME%} 显示应用程序的名称

 不要(在文件中)使用单引号
IWError.html文件是通过Javascript输出的。请务必确认你的文件中没有单引号,否则你的页面会在一个Javascript错误中终止(无法输出)。

--------------------------------------------------------------------

效果图

 

评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值