WordPress.org

Ready to get started?Download WordPress

Forums

WP Super Cache
mfunc crashing the code (i've tried late init..) (2 posts)

  1. intrd
    Member
    Posted 1 year ago #

    hello,
    i'm trying to run a simple function to test mfunc..

    <!--mfunc test()-->
    <?php test() ?>
    <!--/mfunc-->
    
    <?php
    function test(){
    	echo "aa";
    }
    ?>

    its return <!--mfunc--> and break my code..

    when i try to set late init to 1 and get this error: Fatal error: Call to undefined function test() in..

    whats wrong?

    http://wordpress.org/extend/plugins/wp-super-cache/

  2. intrd
    Member
    Posted 1 year ago #

    okay i've solved the problem using space before -->, but now i'm trying to show a dynamic rand() value, and always get the same cached value..

    <?php function test(){
    echo rand(1,100);
    }
    ?>
    <!--mfunc test() -->
    <?php test() ?>
    <!--/mfunc -->

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.