A background program of my server can process strings, like this: tool --text "my string, hello world"
But what if the string to be processed already contains the " symbol? How should this parameter be passed?
For example: tool --text "my string, "hello world""
It went wrong.
Can I handle string parameters in a PHP script?

Yes, here is a solution:

$command = "tool --text " . escapeshellarg($text);

Categories: Shell

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments

Tex To PDF
: convert the Latex file which suffix is tex to a PDF file

X
0
Would love your thoughts, please comment.x
()
x