Log

Defining a Home Path in PHP

September 9 2023

Tags: PHP, Web Development

            $protocol = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 'https://' : 'http://';

            if($_SERVER['HTTP_HOST'] === "stumbling.dev") {
                define('HOME_PATH', $protocol . $_SERVER['HTTP_HOST'] . '/');
            } else {
                define('HOME_PATH', $protocol . $_SERVER['HTTP_HOST'] . '/local-project-folder/');
            }
        

First C tutorial fail

September 9, 2023

Tags: C, Software Engineering

I'd heard C was a "strict" language. Something tells me this is a hint of things to come. Turns out there's a difference between using double quotes (") and single quotes (').