Joob Posted January 20, 2015 Share Posted January 20, 2015 Hello guys, I do not know if anyone work or have worked with the "elFinder (file manager)" .. I incorporate "elFinder" to my platform .. and have the following question .. Have its connector: Code: ------------------------------------- //za screen imeto function clean($string) { $string = str_replace(' ', '-', $string); // Replaces all spaces with hyphens. $string = preg_replace('/[^A-Za-z0-9\-]/', '', $string); // Removes special chars. return preg_replace('/-+/', '-', $string); // Replaces multiple hyphens with single one. } //end $srvname = mysql_real_escape_string(trim($_POST['servername'])); //ime na servera $port = (int)$_POST['ports']; //port na servera $ip = mysql_real_escape_string(trim($_POST['serverip'])); //serverip $screen = clean($srvname).$port.'_'.uniqid(); //screen imeto mysql_query("INSERT INTO server (screen) VALUES('$screen')") or die(mysql_error()); $opts = array( 'locale' => 'en_US.UTF-8', 'bind' => array( // '*' => 'logger', 'mkdir mkfile rename duplicate upload rm paste' => 'logger' ), 'debug' => true, 'roots' => array( array( 'driver' => 'LocalFileSystem', 'path' => ''.$screen.'', 'startPath' => ''.$screen.'', 'URL' => dirname($_SERVER['PHP_SELF']) . ''.$screen.'', // 'treeDeep' => 3, // 'alias' => 'File system', 'mimeDetect' => 'internal', 'tmbPath' => '.tmb', 'utf8fix' => true, 'tmbCrop' => false, 'tmbBgColor' => 'transparent', 'accessControl' => 'access', 'acceptedName' => '/^[^\.].*$/', // 'disabled' => array('extract', 'archive'), // 'tmbSize' => 128, 'attributes' => array( array( 'pattern' => '/\.js$/', 'read' => true, 'write' => false ), array( 'pattern' => '/^\/icons$/', 'read' => true, 'write' => false ) ) // 'uploadDeny' => array('application', 'text/xml') ), -------------------------------------- It doesn't work.. I need help for connect to the variable "$screen".. How can call the "table $screen" ? "table $screen": folders are automatically created by users Regards, Joob Link to comment https://forums.phpfreaks.com/topic/294081-elfinder-connection-with-other-table-variable/ Share on other sites More sharing options...
Barand Posted January 20, 2015 Share Posted January 20, 2015 Check your array is as it should be echo '<pre>',print_r($opts, true),'</pre>'; For example, is there a "/" missing from the URL item? Link to comment https://forums.phpfreaks.com/topic/294081-elfinder-connection-with-other-table-variable/#findComment-1503505 Share on other sites More sharing options...
Joob Posted January 20, 2015 Author Share Posted January 20, 2015 With this code: echo '<pre>',print_r($opts, true),'</pre>'; Give me this error about of the JSON.. Invalid response from the server. The data format is not JSON. Link to comment https://forums.phpfreaks.com/topic/294081-elfinder-connection-with-other-table-variable/#findComment-1503506 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.