Php 自定义标记值格式
我想这样做:Php 自定义标记值格式,php,regex,tags,format,Php,Regex,Tags,Format,我想这样做: <my_tag_name> text.. any_text </my_tag_name> <my_tag_name> text.. any_text </my_tag_name> </my_tag_name> tag: reserved_64_characters tag2: reserved_64_characters 这些东西是如何用XML实现的?是否还有一些转义/替换。 我想这样做,任何内容可以插入我的意思是任
<my_tag_name>
text..
any_text
</my_tag_name>
<my_tag_name>
text..
any_text
</my_tag_name>
</my_tag_name>
tag: reserved_64_characters
tag2: reserved_64_characters
这些东西是如何用XML实现的?是否还有一些转义/替换。
我想这样做,任何内容可以插入我的意思是任何字符(也
]]>
所以
text。。
有文本吗
如果我正确理解你的问题(不幸的是,我怀疑这一点),那么现在看看my_tag\u name
now的值是多少
]]>
所以
text。。
有文本吗
是
my_tag_name
now的值您可以使用php的htmlentities()或strip_tags()来解析/清除用户输入…您可以使用php的htmlentities()或strip_tags()来解析/清除用户输入…您应该使用。就这样。您应该使用退出用户输入。就是这样。有史以来最好的帖子之一:本质上:不要在语法中使用正则表达式+1到“不要在语法上使用正则表达式”这是有史以来最好的帖子之一:本质上:不要在语法上使用正则表达式+1到“不要将正则表达式用于语法”我只应用于html标记,但这里我有自己的标记,可能有。。。或者你的意思是仅仅是概念og htmlentities(),我只适用于html标记,但这里我有我自己的标记,可能有。。。或者您指的只是概念og htmlentities(),如果用户插入文本..]]>作为内容会怎么样。仍然需要以某种方式进行替换。如果用户插入文本..]]>作为内容会怎么样。仍然需要以某种方式进行替换。
tag: reserved_64_characters
tag2: reserved_64_characters
<my_tag_name>
<![CDATA[text..
any_text
</my_tag_name>]]>
</my_tag_name>
text..
any_text
</my_tag_name>