Beste Cpérs,
Ik ben bezig met me maffiagame online te zetten. Dit lukt aardig maar nou blijf ik ergens handen en ik zie het maar niet
De warnings:
Warning: fopen(/home/alhxmezd/domains/crime-cl.nl/public_html/includes/cronjobs/cache/cron_hour.txt) [function.fopen]: failed to open stream: Permission denied in /home/alhxmezd/domains/crime-cl.nl/public_html/includes/cronjobs.inc.php on line 29
Warning: fwrite(): supplied argument is not a valid stream resource in /home/alhxmezd/domains/crime-cl.nl/public_html/includes/cronjobs.inc.php on line 31
Warning: fclose(): supplied argument is not a valid stream resource in /home/alhxmezd/domains/crime-cl.nl/public_html/includes/cronjobs.inc.php on line 32
Warning: fopen(/home/alhxmezd/domains/crime-cl.nl/public_html/includes/cronjobs/cache/cron_day.txt) [function.fopen]: failed to open stream: Permission denied in /home/alhxmezd/domains/crime-cl.nl/public_html/includes/cronjobs.inc.php on line 40
Warning: fwrite(): supplied argument is not a valid stream resource in /home/alhxmezd/domains/crime-cl.nl/public_html/includes/cronjobs.inc.php on line 42
Warning: fclose(): supplied argument is not a valid stream resource in /home/alhxmezd/domains/crime-cl.nl/public_html/includes/cronjobs.inc.php on line 43
Warning: fopen(/home/alhxmezd/domains/crime-cl.nl/public_html/includes/cronjobs/cache/cron_2days.txt) [function.fopen]: failed to open stream: Permission denied in /home/alhxmezd/domains/crime-cl.nl/public_html/includes/cronjobs.inc.php on line 51
Warning: fwrite(): supplied argument is not a valid stream resource in /home/alhxmezd/domains/crime-cl.nl/public_html/includes/cronjobs.inc.php on line 53
Warning: fclose(): supplied argument is not a valid stream resource in /home/alhxmezd/domains/crime-cl.nl/public_html/includes/cronjobs.inc.php on line 54
Het script:
<?
// TXT FILES
$file_hour = pad."includes/cronjobs/cache/cron_hour.txt";
$file_day = pad."includes/cronjobs/cache/cron_day.txt";
$file_2days = pad."includes/cronjobs/cache/cron_2days.txt";
// INHOUD OPHALEN
$fhour = fopen($file_hour, "r");
while(!feof($fhour))
{
$uur = fgets($fhour, 4096);
}
// INHOUD² OPHALEN
$fday = fopen($file_day, "r");
while(!feof($fday))
{
$dag = fgets($fday, 4096);
}
// INHOUD³ OPHALEN
$fdays = fopen($file_2days, "r");
while(!feof($fdays))
{
$dagen2 = fgets($fdays, 4096);
}
############################################172800####################################
if(floor($uur/3600) != floor(time()/3600)) {
$cron_pass = "secretcronpassword";
##writen
$handle = fopen($file_hour, "w+");
$wat = time();
fwrite($handle, $wat);
fclose($handle);
#####################
include(pad."includes/cronjobs/cron_hour.php");
}
if(floor($dag/86400) != floor(time()/86400)) {
$cron_pass = "secretcronpassword";
##writen
$handle = fopen($file_day, "w+");
$wat = time();
fwrite($handle, $wat);
fclose($handle);
#####################
include(pad."includes/cronjobs/cron_day.php");
}
if(floor($dagen2/172800) != floor(time()/172800)) {
$cron_pass = "secretcronpassword";
##writen
$handle = fopen($file_2days, "w+");
$wat = time();
fwrite($handle, $wat);
fclose($handle);
#####################
include(pad."includes/cronjobs/cron_2days.php");
}
?>
Toon Meer
Alvast bedankt!
Groeten,
KyleM :cheer: