[Solved] Fatal error: Can’t use function return value in write context in your code on line 3 (PHP)


Try this:

// Check if clock is 4:20am/4:20pm (12h clock) or 4:20/16:20 (24h clock)
if (time() == mktime(4,20,0,0,0,0)) {
    require_once('doc.html');
} else if {
    (time() > mktime (4,20,0,0,0,0));
    require_once('doc2.html');
} else if {
    (time() == mktime(16,20,0,0,0,0));
    require_once('doc2.tml');
} else if {
    (time() > mktime(16,20,0,0,0,0));
    require_once('doc2.html');
}

Your must use == statement for check equals.

3

solved Fatal error: Can’t use function return value in write context in your code on line 3 (PHP)