å®è¡æ¼ç®å(``)ã¨ããã®ããã£ã¦ãããã¯å¤é¨ã®ã·ã§ã«ã³ãã³ããå®è¡ããããã®æ¼ç®åã§ããã ããã¯ã¯ãªã¼ãã§å²ã¾ããé¨åãã·ã§ã«ã®ã³ãã³ãã¨ãã¦å®è¡ãããã è¿ãå¤ããã·ã§ã«ãå®è¡ããçµæã«ãªãã shell_exec()é¢æ°ã¨åããã¨ã ããã使ãã°ãlinuxä¸ãªããã§ããããã¿ããã«PHPã使ããã¨ãã§ããã ã³ã¼ãä¾ã¯ãããªæãã #!/usr/bin/php <?php $result = `ls -ltr *`; echo $result, PHP_EOL; echo "------shell_exec()------",PHP_EOL; $result2 = shell_exec("ls -ltr *test*"); echo $result2, PHP_EOL; å®è¡ããçµæã¯ãã¡ãã # /usr/bin/php sample.php -rwxr-xr-x. 1 roo
{{#tags}}- {{label}}
{{/tags}}