Why “\” gives error while storing it in string in PHP?

前端 未结 4 1191
灰色年华
灰色年华 2021-01-22 12:40

My string looks like:

$fullPath = $dirName . \"/\" . $file;

If I replace / with \\, it gives error:

Expecting identifier

4条回答
提交回复
热议问题