各位大侠帮帮老弟把 ( 积分: 50 )

  • 主题发起人 主题发起人 weilai2570019
  • 开始时间 开始时间
W

weilai2570019

Unregistered / Unconfirmed
GUEST, unregistred user!
string begin
html = &quot;<&quot;, strcontent = &quot;&quot;;
int begin
count = 0, endcount = 0, count = 0, htmlcount = 0;
htmlcount = varcontent.IndexOf(&quot;<&quot;);
if (htmlcount >= 0)
{ count = varcontent.IndexOf(&quot;|&quot;);
[red] begin
count = varcontent.IndexOf(begin
html, count);[/red] strcontent = varcontent.Substring(begin
count,varcontent.Length - begin
count);
endcount = strcontent.Length;
varcontent = varcontent.Substring(count, varcontent.Length - count - endcount);
红色的字体在本机里没有错误为什么传到了服务器上就会报错呢
报的错误是:Index was out of range.Must be non-negative and less than the size of collection.
parameter name:startindex
 
索引越界,
还是应该在本地环境下仔细测试一下。
 
接受答案了.
 
后退
顶部