Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在coldfusion中如何处理404错误或找不到页面错误,如果找不到任何请求的页面,显示自定义错误消息的代码是什么。
谢谢, 尤格尔
你有几个选择:
在 IIS 或 Apache 中,将默认的 404 错误处理程序更改为指向您选择的 cfm 文件。
在 Application.cfc 中,设置 onMissingTemplate 函数来处理对发送到 ColdFusion 的 .cfm 文件的请求,然后 Web 服务器会检查它们是否确实存在。
担