Unix and Linux Discussions Tagged with quotes |
|
Thread / Thread Starter |
Last Post |
Replies |
Views |
Forum |
|
|
|
4 |
14,627 |
UNIX for Advanced & Expert Users |
|
|
|
4 |
12,216 |
What is on Your Mind? |
|
|
|
3 |
7,272 |
Shell Programming and Scripting |
|
|
|
3 |
3,026 |
UNIX for Beginners Questions & Answers |
|
|
|
3 |
4,919 |
UNIX for Beginners Questions & Answers |
|
|
|
9 |
3,149 |
Shell Programming and Scripting |
|
|
|
6 |
5,740 |
Shell Programming and Scripting |
|
|
|
4 |
2,263 |
Shell Programming and Scripting |
|
|
|
2 |
5,750 |
UNIX Desktop Questions & Answers |
|
|
|
32 |
20,523 |
Shell Programming and Scripting |
|
|
|
3 |
1,802 |
Shell Programming and Scripting |
|
|
|
1 |
4,820 |
Shell Programming and Scripting |
|
|
|
2 |
2,593 |
Shell Programming and Scripting |
|
|
|
3 |
4,512 |
Shell Programming and Scripting |
|
|
|
7 |
6,012 |
Shell Programming and Scripting |
|
|
|
10 |
14,194 |
Shell Programming and Scripting |
|
|
|
6 |
21,389 |
Shell Programming and Scripting |
|
|
|
2 |
2,420 |
Shell Programming and Scripting |
|
|
|
3 |
4,580 |
UNIX for Dummies Questions & Answers |
|
|
|
3 |
5,417 |
Shell Programming and Scripting |
|
|
|
5 |
22,332 |
What is on Your Mind? |
|
|
|
2 |
2,797 |
Shell Programming and Scripting |
|
|
|
1 |
2,868 |
Shell Programming and Scripting |
|
|
|
2 |
40,551 |
Shell Programming and Scripting |
|
|
|
13 |
6,472 |
Shell Programming and Scripting |
|
|
|
4 |
5,243 |
Shell Programming and Scripting |
|
|
|
1 |
43,462 |
UNIX for Dummies Questions & Answers |
|
|
|
5 |
5,142 |
Shell Programming and Scripting |
|
|
|
3 |
10,276 |
UNIX for Advanced & Expert Users |
|
|
|
3 |
92,985 |
UNIX for Dummies Questions & Answers |
|
|
|
3 |
21,800 |
Shell Programming and Scripting |
|
|
|
3 |
44,974 |
Shell Programming and Scripting |
|
|
|
5 |
2,526 |
Shell Programming and Scripting |
|
|
|
2 |
10,169 |
UNIX for Dummies Questions & Answers |
|
|
|
3 |
4,144 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
25,724 |
Shell Programming and Scripting |
|
|
|
2 |
2,721 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
2,875 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
2,718 |
Cybersecurity |
|
|
|
4 |
3,605 |
UNIX for Dummies Questions & Answers |
ESCAPESHELLARG(3) 1 ESCAPESHELLARG(3)
escapeshellarg - Escape a string to be used as a shell argument
SYNOPSIS
string escapeshellarg (string $arg)
DESCRIPTION
escapeshellarg(3) adds single quotes around a string and quotes/escapes any existing single quotes allowing you to pass a string directly
to a shell function and having it be treated as a single safe argument. This function should be used to escape individual arguments to
shell functions coming from user input. The shell functions include exec(3), system(3) and the backtick operator.
On Windows, escapeshellarg(3) instead removes percent signs, replaces double quotes with spaces and adds double quotes around the string.
PARAMETERS
o $arg
- The argument that will be escaped.
RETURN VALUES
The escaped string.
EXAMPLES
Example #1
escapeshellarg(3) example
<?php
system('ls '.escapeshellarg($dir));
?>
SEE ALSO
escapeshellcmd(3), exec(3), popen(3), system(3), backtick operator.
PHP Documentation Group ESCAPESHELLARG(3)