<?php
-define('DOCROOT', __DIR__ .'/');
-require_once(DOCROOT . 'config.php');
-require_once(DOCROOT . 'inc/wfpl/upload.php');
+require_once(__DIR__.'/'.'config.php');
+require_once(__DIR__.'/'.'inc/wfpl/upload.php');
function cms_images_autoresize_main_abort_404() {
http_response_code('404');
$width = (int)$matches[2];
$ext = $matches[3];
$in_fn = "$basename.$ext";
- $in_path = DOCROOT . 'cms_images/' . $in_fn;
- $out_path = DOCROOT . 'cms_images/' . $out_fn;
+ $in_path = __DIR__.'/'.'cms_images/' . $in_fn;
+ $out_path = __DIR__.'/'.'cms_images/' . $out_fn;
$lock_path = $out_path . '.lock';
if (!in_array($width, $GLOBALS['wfpl_image_widths'], true)) {