How do I change the default folder?

J.D.
2006-04-18
2014-04-06
  • J.D.

    J.D. - 2006-04-18

    How do I change the folder from the one that the index.php file is in?

     
  • Sacrilege

    Sacrilege - 2012-11-21

    Had this problem myself last night, If anyone is still looking for a solution, heres what I'm doing…
    In a new PHP file have the following code code.

    $FirstDir = "Documents/";

    <iframe id="myFrame" scrolling="no" src="filemanager.php?frame=3&current_dir=$FirstDir" width="100%" style="overflow-x:hidden; position:relative; top:0px; z-index: 1;" frameBorder="0">Browser not compatible. </iframe>

    If you want the iframe to resize on content change, effectively forcing scrolling to no, then add the following:

    <script>
    function alertsize(pixels){
        pixels+=32;
        document.getElementById('myFrame').style.height=pixels+"px";
    }
    </script>

    and inside Filemanager.php -

    Find

    function frame3(){

    - within this function is a call to 

    html_header()

    - after this call put the following:

    echo "<script>
    function() {
        var el = document.getElementById('moreheight');
        if ( el.style.display != 'block' ) el.style.display = 'block';
        else el.style.display = 'none';
        parent.alertsize(document.body.scrollHeight);
    }
    </script>
    </head>

    <body onload=\"parent.alertsize(document.body.scrollHeight);\">
    <div style=\"width:100%;\" id=\"moreheight\">\n";" 

    Replacing 

    echo "<body>\n";"

    .

     
  • shashidhar

    shashidhar - 2014-02-05

    One easy solution is to set the cookie:
    add following line to source code at the beginning.
    setcookie("fm_current_root", "<your_directory_path_from_root>", 0, "/");

     
    • Jan Zumwalt

      Jan Zumwalt - 2014-04-06

      I tried this and it did not work :(

       

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks