Paul1999 Posted January 10, 2023 Share Posted January 10, 2023 Hi Im trying to set up a local version of my website for offline development on my mac, I have configured php and set up apache server using localhost:8080 but for some reason I cant access any links from the home page. I have changed the reference for the root directory as below: <?php //define('ROOT', 'c:/laragon/www/papyrus'); define('ROOT', '/usr/local/var/www'); // require '/home/evanvkrp/public_html/christopherknight.co.uk/config.php'; require ROOT.'/res/helpers/functions.php'; require ROOT.'/res/helpers/url-manager.php'; require ROOT.'/res/partials/page-manager.php'; ?> <!-- html -------------------------------------------- --> <!DOCTYPE html> <html lang="en"> <!-- head -------------------------------------------- --> <head> <!-- meta --> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <!-- css --> <link href="/css/reset.css" rel="stylesheet"> <link href="/css/slick.css" rel="stylesheet"> <link href="https://use.typekit.net/saj6qqt.css" rel="stylesheet"> <link href="/css/app.css" rel="stylesheet"> <script src="/js/jquery-3.4.0.min.js"></script> <title><?= $pages[$page]['name']; ?></title> </head> <!-- content -------------------------------------------- --> <body> <!-- menu icon --> <div class="menu-icon-cont wrap-padding"> <div class="menu-icon hamburger"> <div class="slice-1"></div> <div class="slice-2"></div> </div> </div> <?php include ROOT.'/res/partials/menu.php'; ?> <?php include ROOT.'/res/partials/header.php'; ?> <?php include $path_to_page.'/content.php'; ?> <div id="page-<?= $page; ?>" class="page"> <?php include $path_to_page.'/index.php'; ?> <?php include 'res/partials/footer.php'; ?> </div> <!-- javascript -------------------------------------------- --> <script src="/js/functions.js"></script> <script src="/js/fade-in-scroll.js"></script> <script src="/js/slick.min.js"></script> <script src="/js/slider.js"></script> <script src="/js/fade-in-config/global.js"></script> <!-- <script src="/js/fade-in-config.js"></script> --> <!-- load page-specific scripts --> <?php if($page === 'contact-us'): ?> <script src="/js/validate.min.js"></script> <?php endif; ?> <?php if(file_exists(ROOT.'/js/pages/'.$page.'.js')): ?> <script src="/js/pages/<?= $page ?>.js"></script> <?php endif; ?> <?php if(file_exists(ROOT.'/js/fade-in-config/'.$page.'.js')): ?> <script src="/js/fade-in-config/<?= $page ?>.js"></script> <?php endif; ?> <script> $(function() { $('.menu-icon').on('click', function() { var hidden = $('#main-menu').hasClass('menu-hidden') ? true : false; if(hidden) { $(this).removeClass('hamburger').addClass('cross'); $('#main-menu').removeClass('menu-hidden').addClass('menu-visible'); } else { $(this).removeClass('cross').addClass('hamburger'); $('#main-menu').removeClass('menu-visible').addClass('menu-hidden'); } }); }); </script> </body> </html> Quote Link to comment https://forums.phpfreaks.com/topic/315780-php-apache-configuration/ Share on other sites More sharing options...
requinix Posted January 10, 2023 Share Posted January 10, 2023 You've said what you can't do, but haven't mentioned what happens when you try. You've also posted some code, but not the code that actually includes the links in question. How about a little more description about what's going wrong first before we worry about the code? Quote Link to comment https://forums.phpfreaks.com/topic/315780-php-apache-configuration/#findComment-1604512 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.