【发布时间】:2011-03-24 00:12:52
【问题描述】:
如果我有一个类内部的函数,并且返回“无效”,我该如何从顶部函数开始备份?
function test(){
//curl here
//other stuff here
if(strpos($data, 'invalid')){
print "invalid";
//discard and remove
continue ;
}
}
但我收到以下错误
致命错误:无法中断/继续 1 级
如果我遇到 "invalid" 我想重新开始 test()..
【问题讨论】:
-
您应该发布您的整个代码,因为目前您似乎在使用 continue 语句,而没有处于循环中(如“for”或“while”)。
标签: php