[英]How to check if a file contains html instead of true content, when using a .php download service?
My C# WinForms app downloads files from a .php downloading web service. 我的C#WinForms应用程序从.php下载Web服务下载文件。
The .php page returns error as HTML pages displayed to the user (I don't have an alternative API for this) 当向用户显示HTML页面时,.php页面返回错误(我没有替代的API)
What would be the best way, provided a file on the disk, to: 1) identify if the file is an HTML file. 提供磁盘上的文件,最好的方法是:1)识别文件是否为HTML文件。 2) determine if it has the content of an error page (specified as comment tags, or plain text displayed to the user) 2)确定它是否具有错误页面的内容(指定为注释标签或显示给用户的纯文本)
Thanks in advance. 提前致谢。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.