PHP DOMDocument: RS: loadHTMLFile gizemli karakteri boğulma

2 Cevap php

Using php's DOMDocument->LoadHTMLFile('test.html'); keeps on returning an error to me, reporting for an error in the content at line 36. Deleting character after character, it turns out it's an apparently empty space that was the culprit. Copying/pasting that sentence in another editor (Editra), showed a strange RS character.

Ne olduğunu, ve daha da önemlisi, nasıl ben yine olay önleyebilirsiniz?

2 Cevap

Bir Record separator bulunuyor

Can be used as delimiters to mark fields of data structures. If used for hierarchical levels, US is the lowest level (dividing plain-text data items), while RS, GS, and FS are of increasing level to divide groups made up of items of the level beneath it.

SEQ: ^^ - Dec: 30 - Hex: 1E - Acronym: RS

Ne yapabilirim strtr() to strip away non visible characters. An example by Joel Degan on PHP.net size yolda almalısınız kullanmaktır.

As I recall, PHP is throwing a non-fatal error in this case. It will complain about a lot of things, which you can't do anything about if the file is not created by you. What you can do, is use bad programming practices and suppress the errors by putting @ before the command.

@DOMDocument->LoadHTMLFile('test.html');

Hala dosyasını yüklemek gerekir, ama sen hataları "görmezden" olacak. Cehalet mutluluktur?