doc中缺少换行会导致解析问题吗? [英] Would a lack of line breaks in a doc cause parsing problems ?

查看:65
本文介绍了doc中缺少换行会导致解析问题吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用这样的PHP获取一些产品供稿


$ merch = substr($ key,1);

$ feed = file_get_contents($ _POST [''data_url''。$ merch]);

$ fp = fopen(" ./ feeds / feed"。$ merch。" .txt"," w +" );

fwrite($ fp,$ feed);

fclose($ fp);


然后解析它们PHP的原生解析功能。对于大多数Feed来说,这是成功的,但是当我知道它们不是时,其中一些声称是空的
。在检查时,这些失败的东西

饲料的共同点是它们根本不包含换行符。

这是否会导致问题?

I am fetching some product feeds with PHP like this

$merch = substr($key,1);
$feed = file_get_contents($_POST[''data_url''.$merch]);
$fp = fopen("./feeds/feed".$merch.".txt","w+");
fwrite ($fp,$feed);
fclose ($fp);

and then parsing them with PHP''s native parsing functions. This is
succesful for most of the feeds, but a couple of them claim to be
empty when I know they are not. On inspection, the thing these failing
feeds have in common is that they contain no line breaks at all.
Should this cause a problem ?

推荐答案

merch = substr(
merch = substr(


key,1);
key,1);


feed = file_get_contents(
feed = file_get_contents(


这篇关于doc中缺少换行会导致解析问题吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆