Hello,
I am quite new to web programming in general, so maybe I am missing something :)
According to the F3 documentation abut system variables:
BASE
Type: string, Read-only Default: auto-detected
Path to the index.php main/front controller.
So, I have created a template page like this:
<link rel="icon" href="{{ @BASE }}/app/images/favicon.ico" />
<link rel="stylesheet" href="{{ @BASE }}/css/bootstrap.min.css">
<link rel="stylesheet" href="{{ @BASE }}/css/bootstrap-theme.min.css">
<link rel="stylesheet" href="{{ @BASE }}/css/theme-cfm.css">
<link rel="stylesheet" href="{{ @BASE }}/css/jquery-ui.css">
<link rel="stylesheet" href="{{ @BASE }}/css/bootstrap-confirm-delete.css">
<link rel="stylesheet" href="{{ @BASE }}/css/calendar.css">
<script type="text/javascript" src="{{ @BASE }}/js/jquery-3.2.1.js"></script>
<script type="text/javascript" src="{{ @BASE }}/js/jquery-ui.js"></script>
<script type="text/javascript" src="{{ @BASE }}/js/bootstrap.js"></script>
<script type="text/javascript" src="{{ @BASE }}/js/bootstrap-confirm-delete.js"></script>
<script type="text/javascript" src="{{ @BASE }}/js/utils.js"></script>
<div class="container theme-showcase" role="main">
<a href="{{ @BASE }}"><img src="{{ @BASE }}/app/images/mylogo.png" alt="Home" height="60"></a>
<include href="{{ @content }}" />
And I set the content in function of the actions I take.
Everything works fine, I have the images displayed in every page, the CSSs and JavaScripts (Bootstrap, Jquery) available on every page.
However, I was expecting that the link on the image mylogo.png to be the same on every single page, pointing to my virtual host main page:
http://calendar:8080.
The route.cfg file is:
GET / = GlobalController->overview
GET /calendar/@id = GlobalController->calendar
The .htacces file:
# Enable rewrite engine and route requests to framework
# Some servers require you to specify the `RewriteBase` directive
# In such cases, it should be the path (relative to the document root)
# containing this .htaccess file
RewriteRule ^(tmp)\/|\.ini$ - [R=404]
RewriteCond %{REQUEST_FILENAME} !-l
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php [L,QSA]
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
And the index.php (situated at the root of my structure):
<?php
$f3=require('lib/base.php');
if ((float)PCRE_VERSION<7.9)
trigger_error('PCRE version is out of date');
// Load configuration
$f3->config('config/config.cfg');
$f3->config('config/routes.cfg');
$f3->run();
?>
Currently I am developing on Windows 10x64, WAMP Server 3.1.6, Apache Version 2.4.33, PHP Version: 7.0.33 (I have tried with 7.2.13 as well) and F3 version 3.6.4.
So, my question is again: what am I missing?
Thank you in advance for your help!