How do I change the default folder?

  • 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:

    function alertsize(pixels){

    and inside Filemanager.php -


    function frame3(){

    - within this function is a call to 


    - after this call put the following:

    echo "<script>
    function() {
        var el = document.getElementById('moreheight');
        if ( != 'block' ) = 'block';
        else = 'none';

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


    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 :(


Log in to post a comment.

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

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks