<commit_before><?php
// This file allows us to emulate Apache's "mod_rewrite" functionality from the
// built-in PHP web server. This provides a convenient way to test Vanilla
// forum without having installed a "real" server software here.
$uri = urldecode(parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH));

if ($uri !== '/' && file_exists(__DIR__.'/public'.$uri)) {
    return false;
}

// Remove starting slash if it exists, and set the url as the page to retrieve
$uri = ltrim($uri, '/');
$_GET['p'] = $uri;

// "Bootstrap" the root path to make sure we get the public folder
define('PATH_ROOT', getcwd().'/public');

require_once __DIR__.'/public/index.php';<commit_msg>Uses dirname() instead of getcwd() to ensure correct path<commit_after><?php
// This file allows us to emulate Apache's "mod_rewrite" functionality from the
// built-in PHP web server. This provides a convenient way to test Vanilla
// forum without having installed a "real" server software here.
$uri = urldecode(parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH));

if ($uri !== '/' && file_exists(__DIR__.'/public'.$uri)) {
    return false;
}

// Remove starting slash if it exists, and set the url as the page to retrieve
$uri = ltrim($uri, '/');
$_GET['p'] = $uri;

// "Bootstrap" the root path to make sure we get the public folder
define('PATH_ROOT', dirname(__FILE__).'/public');

require_once __DIR__.'/public/index.php';
{'fraction_non_alphanumeric': 0.1423487544483986, 'fraction_numerical': 0.0, 'mean_word_length': 4.601593625498008, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2798724', 'n_tokens_mistral': 429, 'n_tokens_neox': 426, 'n_words': 159}