Browse Source

changed to exec command

DS 2 years ago
parent
commit
0b24ec649b
2 changed files with 6 additions and 3 deletions
  1. 5 2
      js/execParser.php
  2. 1 1
      js/executeNodeSetParser.js

+ 5 - 2
js/execParser.php

@@ -1,4 +1,7 @@
 <?php
-$output = shell_exec('ls');
-echo "<pre>$output</pre>";
+$file = 'C:\xampp\htdocs\SMF\sdsdssss.docx';
+
+$content = exec( 'ls', $output );
+
+var_dump( $output );
 ?>

+ 1 - 1
js/executeNodeSetParser.js

@@ -4,5 +4,5 @@ https://stackoverflow.com/questions/1880198/how-to-execute-shell-command-in-java
 */
 
 var fs = require('fs');
-var files = fs.readdirSync('.');
+var files = fs.readdirSync('js');
 console.log('OK: ' + files);