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错误中终止(无法输出)。
--------------------------------------------------------------------
效果图