Jump to content

Caching Writing


Monkuar

Recommended Posts

I am using a cache script, well it writes a array to a file like this:

 

fwrite($fh, '<?php'."\n\n".'define(\'PUN_LOTTERY_LOADED\', 1);'."\n\n".'$lottery = '.var_export($output2, true).';'."\n\n".'?>');

 

output2 is

 

$result2 = $db->query('MY QUERY ');
$output2 = array();
while ($cur_donors = $db->fetch_assoc($result2))
	$output2[] = $cur_donors;

 

 

Now, I want to ditch the mysql and I want to use this script with 7 variables that I already have loaded, so I dont need to use the mysql, how do I add my 7 variables to my var_export function instead of using mysql to loop them?

 

Link to comment
https://forums.phpfreaks.com/topic/258652-caching-writing/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.