remote.php 455 B

12345678910111213141516
  1. <?php
  2. $RUNTIME_NOSETUPFS = true;
  3. //$RUNTIME_NOAPPS = TRUE;
  4. require_once('lib/base.php');
  5. $path_info = $_SERVER['PATH_INFO'];
  6. if (!$pos = strpos($path_info, '/', 1)) {
  7. $pos = strlen($path_info);
  8. }
  9. $service=substr($path_info, 1, $pos-1);
  10. $file = OCP\CONFIG::getAppValue('core', 'remote_' . $service);
  11. if(is_null($file)){
  12. header('HTTP/1.0 404 Not Found');
  13. exit;
  14. }
  15. $baseuri = OC::$WEBROOT . '/remote.php/'.$service.'/';
  16. require_once(OC::$APPSROOT . $file);