• Resolved yellofish

    (@yellofish)


    The code window is way too small! I really didn’t like that. I still love this plugin, but use it in a slightly different way.

    I put this code in the tiny text field:

    <?php
       $path = $_SERVER['DOCUMENT_ROOT'];
       $path .=  "../../../phpstore/mycode.php";
       include($path);
    ?>

    The /phpstore/ folder is way below the /public_html/ fold and out of webreach. Now I can create a *.php page, use Notepad++ to write my code, have all my code in one folder, and can upload it with and FTP program.

    Only problem, your cache will not notice any change, even Ctrl+F5 may not work, so whenever you change the remote *.php page you need save the WordPress page/post too.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Wow, i love this way to control all the code in one php file in the root…thanks for sharing your idea, and thanks the author for this plugin.

    What do you think to add the rand() to the file to escape the brower cache, or mybe some thing like this:

    $path .=  "../../../phpstore/mycode.php?=<?php echo filemtime($filename)?>";
    $path .=  "../../../phpstore/mycode.php?<?=rand(1,32000)?>

    @yellofish I used the include option and it work with no problem with the cache.

    <?php
    include(TEMPLATEPATH . '/phpstore/mycode.php');
    ?>
    Plugin Author Alex

    (@alexander_fuchs)

    Hey guys,

    regarding cache: depending on the caching plugin you would need to purge the cache after saving the file. Normally saving the WordPress page does this for you when editing inside WordPress.

    Some caching plugins (e.g. WP Super Cache) allow you to delete the cache for single pages by opening the url with a special parameter. You will need to check the plugins for this.

    You could also exclude the PHP code in the cache to permanently disable the caching for the page with the PHP code.

    Best Alex

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘The code window is way too small!’ is closed to new replies.