没有数据收到错误代码:PHP中的ERR

编程入门 行业动态 更新时间:2024-10-19 08:44:57
本文介绍了没有数据收到错误代码: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

本文发布于:2023-10-11 23:01:20,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1483083.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:错误代码   数据   ERR   PHP

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!