V
V
Vakha12018-09-18 18:12:05
PHP
Vakha1, 2018-09-18 18:12:05

How to correctly specify links in the menu?

Good evening!
I created a menu, it lies in the header of the site in the header.php file, which I connect to each page through - require_once("includes/header.php");
And now the next problem is when I am on the main page - localhost/app/index.php
And now if I click on the link for example news, the request address is such
localhost/pages/news.php - and accordingly it turns out that there is no such page since the real address localhost/app/pages/news.php
How to do it right?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Timofeev, 2018-09-18
@webinar

And now if I click on a link, for example news, the request address is like this

depending on which link, if it is /pages/news.php, then naturally it builds from the domain. Remove the app, why do you need it?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question