?? ???? ??? ??? ???? ?? ???? ??? ?? ??? ?????. \ n ?? $? ?? ?? ? ?? ?????? ?? ???? ?? ?? ? ???? ????, ???? ?? ?? ??? ??? ?? ?? ???? ?? ?? ??? ????, ?? ?? ?? ???? HEREDOC? ????, ?? ?? ???? ?? NOWDOC? ????, ?? ???? ? ???? ???? ???? ??? ??????.
PHP?? String Literals? ?? ? ?, ?? ?? ???, ?? ?? ?? ?? ??? ?? ? ?? ???? ???? ?? ??????. PHP? ?? ??? ???? ?? ? ?? ? ??? ?? ???? ?? ?? ??? ??? ??? ??? ??? ??? ?????? ?? ? ? ????.

?? ?? ??? : ???? ?
PHP??, ?? ?? ???? ?? ???? ?????. ??? Backslash ( \
)? ???? ?? ?? ??? ???? ?? ??? ????? ?? ?????.
?? ?? ???? ???? ?? ???? ??? ????.

-
\"
- ?? ??? ?? ???? ????? -
\$
- ?? ?? ?? (??$
??? ?? ??) -
\\
- ?? ? ???? ????? -
\n
- Newline -
\r
- ??? ?? -
\t
- ? -
\v
- ?? ? -
\e
- ?? ?? (ASCII 27) -
\0
~\377
- ?? ?? ?? -
\x00
to\xFF
- 16 ? ?? ?? -
\u{0000}
to\u{10FFFF}
- ?? ?? ?? ??? (??? ? ??)
?? ??:
echo "hello \ tworld \ n"; // ?? : Hello World // (? ???)
? ??? ??? ?? ?? ?? ???? ???? ??? ? Windows ?? ?? ? Regex ??? ??? ? ??? ??? ?? ?? ??????? ?? ?????.

?? ??? ??? : ?? ??
?? ??? ???? ? ?? ??????. ???? ?? ???? ?????. ??? ? ?? ??? ??? ????.
-
\\
- ?? ???? ? ??????? -
\'
- ?? ???? ?? ???????
?? ?? ?? ?? ???? ?????.
echo 'hello \ nworld'; // ?? : hello \ nworld
Newline? ???? ????. ??? ???? ?? ???? ?? ??? ?? ?? ??? ???? ? ? ?? ?? ???? ??????.
??? ?? $
?? \
???? HTML ?? JavaScript? ???? ?? ?? ???? ? ??? ??? ??? ? ??????.
HEREDOC ? NOWDOC : ?? ??? ???
?? ?? ???? ?? PHP? heredoc
? nowdoc
?????.
- Heredoc? ?? ?? ????? ????? (?? ? ??? ?????).
- Nowdoc? ?? ?? ????? ????? (?? ??).
?:
$ name = "Alice"; ?? <<< eot ????? $ name \ n ??? ????? eot; // ?? : ????? Alice \ n // ??? ?????
??? ?. NOTICE \n
Newline??? ?????? ????? Heredoc? ?? ???? ?? ????? ??? ???? ?????. ? ?? \n
????? ????? ?? (??? ? ??? ?) ?? ? ?? ?? ?? ?? ????. ?? Newline? ????? ?? ?? ???? ?? PHP_EOL
??????.
??? Newline? ? ?? ? :
?? <<< eot ????? $ ????? ??? ????? eot;
NowDoc? ??? ??? ????.
echo <<< 'eot' ????? $ name \ n ???? ?? ? ??? ????. eot;
??? ???? ??? ??? ?????.
???? ?? ???? ??
- ?? ? ?????? ???? ?? ?? ?? ???? ?????? . ?? ? ??? ?????.
- ?? ??? ?? ???? ???? ?? ?? ????? Escape
$
:"The cost is \$10"
- ?? ??? ?????? :
"\40"
? ?? (10 ? 40 ?)???"\8"
??"\9"
8? 9? ??? ?? ??? ??? ???"8"
??"9"
????. PHP? ?? ? ?? ???? ??? ?????. - ?? ?? ?????? ?? ???? (
preg
??? ??)??u
???? ????? ??????\u{...}
?? ?? ??? ??? ? ?? (?? PHP? ???) ?? ?? ?? Heredoc??? ?????. - ?? ??? ? ???
\\
/
?? ? ?? -DIRECTORY_SEPARATOR
??realpath()
???? ??? ?????.
????? ??????.
?? ??? → ?? ? ?? ??.
?? ??? → ?? ?? ?? ?? ??????.
????? ??? ??? ?? HTML ?? ?? ?? JSON ??? ???? ?? ? ??? ???? ??? ??? ?????.
??? ???? ???? ??????.
? ??? ???? ?? ??? : PHP ?? ???? ???? ?? ?????. ??? ??? PHP ??? ????? ?? ?? ??? ?????!

? AI ??

Undress AI Tool
??? ???? ??

Undresser.AI Undress
???? ?? ??? ??? ?? AI ?? ?

AI Clothes Remover
???? ?? ???? ??? AI ?????.

Clothoff.io
AI ? ???

Video Face Swap
??? ??? AI ?? ?? ??? ???? ?? ???? ??? ?? ????!

?? ??

??? ??

???++7.3.1
???? ?? ?? ?? ???

SublimeText3 ??? ??
??? ??, ???? ?? ????.

???? 13.0.1 ???
??? PHP ?? ?? ??

???? CS6
??? ? ?? ??

SublimeText3 Mac ??
? ??? ?? ?? ?????(SublimeText3)

preg_quote()escapesregex-specialcharacters,includingbackslashesandthedelimiter,totreatthemasliterals;2.avoiddouble-escapingbypassingrawstrings(e.g.,'C:\path')withoutpre-escapedbackslashes;3.useforwardslashesinpathswhenpossibletoreducebackslashclutter

Heredoc? \ n, \ t, \\, \ $? ?? ?? ?? ? ?? ?? ???? ????? \ "?? \ '? \"?? \'? ???? ??? nowdoc? ?? ?? ? ?? ??? ???? ????. \ n ? ??? ??? ?? ??? ?? ??? ?????. \ n Nowdoc??? ?????.

Inbash, SinglequotestreatAllCharacterslerally whilewoblequoteVariableexpansionandlimitedescaping; inpythonandjavaScript, bloquoTeTyShandleEscapesThesame, with withreadeafectingreadabilityand andconience bddingddingquotes, sousesinglequote

AlwaysecapeOutusingContext-specificmethods : htmlSpecialchars () forhtmlcontentandattributes, rawurlencode () forurls, andjson_en Code () withjson_hex_tag, json_hex_apos, json_hex_quot, andjson_unescaped_unicodeforjavaScript.2.usetemplatingEnginesliketwig, lara

Tomasterbackslashesinphpregex, Parpparsoccur : phpprocessesescapesequencesfirst, thenthegexenginedoes;

SQL ?????? ???? ?? SQL ?????? ???? ?? ??? AddSlashes ()? ??????. htmlspecialchars ()? XSS ??? ???? ?? HTML ??? ?????. mysqli_real_escape_string ()? mysql ???? ??? ??? ??? ? ???, ??? ?? ??? ??? ???? ??? ?? ?????. 1. AddSlashes ()? ???? ???? ??? ???? ?? ???? SQL ??? ????? ????. 2. XSS? ???? ?? ??? ??? ???? HTML? ?? ? ? HTMLSpecialchars ()? ???????. 3. mysqli_real_escape_string (

SQL ?? ??? ?? ??? ???? ???? ??? ?? ??? ?? ?? ? ? ?? ??? AddSlashes ()? ?? ? ? ????. ??? ??? (? : PDO ?? MySQLI? ?? ?? ??? ? ??)? ??? ??? ?? ???? ??? SQL ???? ???? ???? ? ???????. ???? ??? ??? ?? ?????? ? ?? ?? (? : real_escape_string ? ??? ?? ?? ??), ??? ?????? ?? ??? ?? ??, ?? ?? ??? ? ?? ??? ???? ?? ? ??? ???????.

BackslashesgomissinginPHPbecausetheyaretreatedasescapecharactersindouble-quotedstrings,sotofixthis:1.Usesinglequotesforliteralpathslike'C:\Users\John\Documents',2.Ordoublethebackslashesindoublequotesas"C:\\Users\\\\John\\Documents",3.Prefer
