双引号不会被正常复制.我该如何编辑它们? [英] Double quotes are not copied normally. How can I edit them?

查看:30
本文介绍了双引号不会被正常复制.我该如何编辑它们?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我用双引号复制单词时,.php 页面显示错误.双引号不会被正常复制.我该如何解决?我可以编辑哪些代码?(我的脚本是 Wordpress.)

When I copy the words with double quotes, .php pages show an error. Double quotes don't get copied normally. How can I solve it? Which codes can I edit? (My script is Wordpress.)

示例:$goster = getenv(HTTP_USER_AGENT");

在上面的例子中,在 HTTP 之前和 AGENT 双引号之后.这是我的用户的问题.我想我必须在 Wordpress 中的 blockquotes 功能中进行编辑.有什么想法吗?

Before HTTP and after AGENT double quotes in example above. It is a problem with my users. I think I must edit in blockquotes function in Wordpress. Any idea?

推荐答案

那些是智能引号 (e2 80 9c),不被PHP 词法分析器,您似乎已经知道了.

Those are smart quotes (e2 80 9c), and aren't considered string delimiters by the PHP lexer, which it seems you already know.

用单引号 ' 或双引号 " 替换它们.如果您从用智能引号替换普通引号的程序中复制它们,那绝对不是专为代码而设计,您应该停止为此目的使用它.

Replace them with either the single quote ' or double quotes ". If you are copying those from a program which is replacing normal quotes with smart quotes, it's definitely not designed for code and you should stop using it for that purpose.

这篇关于双引号不会被正常复制.我该如何编辑它们?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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