本文介绍了没有数据收到错误代码:PHP中的ERR_EMPTY_RESPONSE?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
php code:
$ xfc = file_get_contents( jfi.tex); $ output = preg_replace_callback(' / \\\\(引用[^ {] * ){([^}] *)} /',函数($ m) {return preg_replace(' /([^,] +)(?:,| $)/',' < xref'。$ m [1]。' > $ 1< / xref> ',$ m [2]);} ,$ xfc); $ output1 = preg_replace_callback(' /< xref((?:。| [\\\\\] n])+)< \ / xref /',函数($ m){ return preg_replace(' / [\\\\ n] /',' ',$ m [0]);},$ output); $ array = explode( \\\\ n, $输出1); for($ i = 0; $ i< count($ array); $ i ++){ file_put_contents( xref.tex,$阵列[$ i]于,FILE_APPEND); }如果我删除
$ output1 = preg_replace_callback('/< xref((? :。| [\\\\ n]] +)< \ / xref /',函数($ m){return preg_replace('/ [\\ n] /','',$ m [0]);},$ output);这行来自代码,程序执行正常。我不知道在那里做错了什么。这个错误对我来说是新的。由于脚本,程序甚至没有编译。 这是因为preg_replace()?或者是其他东西?。当然这不是语法错误。
解决方案xfc = file_get_contents( jfi.tex);
output = preg_replace_callback(' / \\\\(引用[^ {] *){([^}] *)} /',函数(
m) {return preg_replace(' /([^,] +)(?:,|
php code:
$xfc=file_get_contents("jfi.tex"); $output= preg_replace_callback('/\\\\(cite[^{]*){([^}]*)}/', function($m) {return preg_replace('/([^,]+)(?:,|$)/' ,'<xref '. $m[1].'>$1</xref>',$m[2]); } ,$xfc); $output1= preg_replace_callback('/<xref((?:.|[\r\n])+)<\/xref/', function($m) { return preg_replace('/[\r\n]/','',$m[0]);},$output); $array=explode("\r\n",$output1); for($i=0;$i<count($array);$i++){ file_put_contents("xref.tex",$array[$i],FILE_APPEND); }If I delete
$output1= preg_replace_callback('/<xref((?:.|[\r\n])+)<\/xref/', function($m) {return preg_replace('/[\r\n]/','',$m[0]);},$output);this line from code, program executes fine. I don't know what mistake am doing there. This error is new to me. Because of script the program is not even compiled. Is this because of preg_replace()? or something else?. Surely it is not a syntax error.
解决方案 xfc=file_get_contents("jfi.tex");output= preg_replace_callback('/\\\\(cite[^{]*){([^}]*)}/', function(m) {return preg_replace('/([^,]+)(?:,|更多推荐
没有数据收到错误代码:PHP中的ERR
发布评论