English 中文(简体)
“未预见的EOF”: 我如何从《加拿大刑法》中删除所有新路线?
原标题:"Unexpected EOF" : How do I remove all newlines from php code?

我有一份读到档案(档案_get_contents)。 我想用新路线取代所有新路线,并排除所有其他特征。 然而,在将内容解释成单字母变量时,我正遇到一个错误。

我认为,有罪的一方是“亚美尼亚”的特性,但我不知道如何去除。 “生态学”是一种特质,我认为“生态学”实际上属于扼杀本身。

我如何把这种特性从在营地中抹去?

“entergraph


奥凯以前我的问题是错误的,因此,我用新的内容更新了这个问题。

How do I ensure that all newlines are removed from a php string? This string is read in with file_get_contents, then javascript is dynamically created with the contents of the file. The " " is replaced with "NEW," and the " " is replaced with "".

However, I am getting an "Unexpected EOF" error, and when I copy the string and paste it into the console, something is giving me newlines. How do I make sure that ALL newlines (whitespace for that matter) is trimmed out?

trim() str_replace preg_replace

不管怎样使用,都非常赞赏任何帮助!

SyntaxError: Unexpected EOF

最佳回答

CTRL-Z是文件档案的监督事务司/Windows-of-file特点。 如果你审查你的投入文件,你可能会发现这一特性。

It stems from the earliest days (CP/M no less) when files were an exact multiple of the disk sector size so you couldn t have files that weren t a multiple of that.

So, if you wanted to end the file earlier, you placed a special end-of-file character in there that the file reading routines would understand. This wasn t really a problem for binary files since it didn t matter if they had extraneous information at the end - it would most likely be ignored. However, you _didn t want any rubbish at the end of your nice little WordStar 3.3 document.

www.un.org/Depts/DGACM/index_french.htm

$str = str_replace ("x1a", "", $str);
问题回答

首先,没有象牙齿这样的东西。

^ M是运输回程的代码,可能来自与文件一起工作的窗口机器。

^ 兹视此为你可以读到的“替代”特性:, 基本意思是“我不知道如何代表这一地点的性质”

尽管如此,我看到巴克斯博略刚才在我前面已经张贴,该法典应该 do。 祝你的项目好!





相关问题
selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

How to fire event handlers on the link using javascript

I would like to click a link in my page using javascript. I would like to Fire event handlers on the link without navigating. How can this be done? This has to work both in firefox and Internet ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Clipboard access using Javascript - sans Flash?

Is there a reliable way to access the client machine s clipboard using Javascript? I continue to run into permissions issues when attempting to do this. How does Google Docs do this? Do they use ...

javascript debugging question

I have a large javascript which I didn t write but I need to use it and I m slowely going trough it trying to figure out what does it do and how, I m using alert to print out what it does but now I ...

Parsing date like twitter

I ve made a little forum and I want parse the date on newest posts like twitter, you know "posted 40 minutes ago ","posted 1 hour ago"... What s the best way ? Thanx.

热门标签