Skip to content

Commit c039b17

Browse files
committed
Prevent issues with relative paths, especially in cronjobs, as described in #8
1 parent 08a7305 commit c039b17

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

functions.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
//Try to load required config.php, if it fails, output error, as user probably has not followed "Getting started" guide.
4-
if (!include_once('config.php')) {
4+
if (!include_once(__DIR__ . '/config.php')) {
55
outputStderr("Could not open config.php. Please follow the getting started guide and provide a valid config.php file. Exiting.");
66
exit(1);
77
}

update.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<?php
33

44
//Load necessary functions
5-
require_once 'functions.php';
5+
require_once __DIR__ . '/functions.php';
66

77
outputStdout("=============================================");
88
outputStdout("Running dynamic DNS client for netcup 3.0");

0 commit comments

Comments
 (0)