How to (re)scan files without command line access?

The final script:

<?php
// copy the script into the nextcloud mainfolder where console.php is located, e.g. /var/www/nextcloud
$path = realpath(dirname(__FILE__));
echo "PHP Version: " . phpversion() ."<br>";
// run upgrade routines after installation of a new release. The release has to be installed before.
//exec("php $path/console.php upgrade 2>&1", $out, $result);
// rescan filesystem
exec("php $path/console.php files:scan --all -v 2>&1", $out, $result);
// for more commands see documentation
echo "Returncode: " .$result ."<br>";
echo "Console output: " ."<br>";
echo "<pre>"; print_r($out);
?>
1 Like