Invalid mfunc tag syntax
-
Hi- I’m having trouble getting the syntax correct for using fragment caching with W3 Total Cache.. Anyone been able to get this working properly?
Here’s what I’ve got right now:
<!-- mfunc --> <?php $file = '/path/to/file.csv'; $fp = fopen($file, 'r'); $contents = fread($fp, filesize($file)); fclose($fp); $contents = explode(",", $contents); $var1 = $contents[0]; $var2 = $contents[1]; $var3 = $contents[2]; echo ""; ?> <!-- /mfunc -->
I’m then attempting to output those 3 variables later on down the page. I’d seen that mfunc needs an echo inside of it, so I dropped in that empty echo, but no good.
Everything I’ve tried throws the error:
Inavalid mfunc tag syntax. Correct: <!-- mfunc PHP code --><!-- /mfunc --> or <!-- mfunc -->PHP code<!-- /mfunc -->.
Thanks!
-Rob
Viewing 12 replies - 1 through 12 (of 12 total)
Viewing 12 replies - 1 through 12 (of 12 total)
- The topic ‘Invalid mfunc tag syntax’ is closed to new replies.