php include error

hello admin,I changed my HTML coding for header navbar and footer to PHP include so that I don’t have to change every single page when I have to add something new but when I call the PHP include function from /htdocs/BE/Aeronautical Engineering/3rd sem, it shows nothing, no navbar no header.
“<?php include('../header.php') ?>”
this is my php include function please help me to solve this problem
site address http://solutiongeek.in/BE/Aeronautical%20Engineering/3rd%20SEM.php

@download said:
hello admin,I changed my HTML coding for header navbar and footer to PHP include so that I don’t have to change every single page when I have to add something new but when I call the PHP include function from /htdocs/BE/Aeronautical Engineering/3rd sem, it shows nothing, no navbar no header.
“<?php include('../header.php') ?>”
this is my php include function please help me to solve this problem
site address http://solutiongeek.in/BE/Aeronautical%20Engineering/3rd%20SEM.php

It’s working fine on my end.
Have you tried clearing browser cache?

you forgot to put this in http://solutiongeek.in/BE/Aeronautical Engineering/3rd SEM.php

or header

<div class="Nav" id="Nav">
		            <nav>
			            <ul>
			            <a  href="javascript:void(0)" class="closebtn" onclick="closeNav()">&times;</a>
				        <li><a href="/Index.php"><i class="fa fa-home ">&nbsp;&nbsp;HOME</i></a></li>
				        <li><a href="/aboutus2.php"><i class="fa fa-user">&nbsp;&nbsp;ABOUT US</i></a></li>
				        <li class="pp"><a href="/privacypolicy.html"><i class="fas fa-user-secret">&nbsp;&nbsp;Privacy policy</i></a></li>
			            </ul>
		            </nav>

also please note path here (…/)
<?php include('../header.php') ?>
it mean one folder up for search header.php

but in this location http://solutiongeek.in/**BE**/**Ae**ronautical Engineering/3rd SEM.php

is 3 step !!

To include a file one directory back, use ../file
For two directories back, use ../../file and so on.

so in header.php you need to put javascript for nav
and also div to show this nav always (static)

I mean the content of this <div class="Nav" id="Nav">

@UnknownLolz said:

@download said:
hello admin,I changed my HTML coding for header navbar and footer to PHP include so that I don’t have to change every single page when I have to add something new but when I call the PHP include function from /htdocs/BE/Aeronautical Engineering/3rd sem, it shows nothing, no navbar no header.
“<?php include('../header.php') ?>”
this is my php include function please help me to solve this problem
site address http://solutiongeek.in/BE/Aeronautical%20Engineering/3rd%20SEM.php

It’s working fine on my end.
Have you tried clearing browser cache?

yes I tried clearing cache

@OxyDac said:
so in header.php you need to put javascript for nav
and also div to show this nav always (static)

I mean the content of this <div class="Nav" id="Nav">

I didn’t get it, why should I put javascript for nav

@UnknownLolz said:

@download said:
hello admin,I changed my HTML coding for header navbar and footer to PHP include so that I don’t have to change every single page when I have to add something new but when I call the PHP include function from /htdocs/BE/Aeronautical Engineering/3rd sem, it shows nothing, no navbar no header.
“<?php include('../header.php') ?>”
this is my php include function please help me to solve this problem
site address http://solutiongeek.in/BE/Aeronautical%20Engineering/3rd%20SEM.php

It’s working fine on my end.
Have you tried clearing browser cache?

I already added code to refresh browser whenever user enter

@OxyDac said:
To include a file one directory back, use ../file
For two directories back, use ../../file and so on.

I tried this but still no header
"

<?php include('../../header.php') ?>"

@download said:
@OxyDac said:
To include a file one directory back, use …/file
For two directories back, use …/…/file and so on.

I tried this but still no header
"

<?php include('../../header.php') ?>"

What you want to do including HEADER.PHP then it must be /header.php or /Header.php it because it’s a CaSe Sensitive Server thus check file name!

@download said:
I didn’t get it, why should I put javascript for nav

you do not have to… but currently nav js also contains styling for your nav

you all switched to php just to have a text “solutiongeek” and menu with 2 links?

include what is the same from page to page (you could include navigation or various fixed elements)

asking yourself, “How much of my site is a template (included and unchanging code) and how much of it will vary from page to page?”
in my experience, most professional projects will require more flexibility and less template-ing.

it is very messy. worry about path issues or unnecessary meta-tags.

I told you that it is better to wipe out all and rename folders and files with no space in the name and design a simple page with a useful menu (css)
and then nice sort these pdf files for download in 2-5 pages
you do not need php nor care about the CPU, etc.

only well-organized names and folders !

from the first day you have a problem with the path ( …/ )
there are still many URL in pages on your website that does not lead anywhere
(broken links - because path)

so if some page is on location mydomain/folder1/folder2/test.php

The code in that test.php should be

<?php include '../../header.php';?>

because your header.php is located here http://solutiongeek.in/header.php

@OxyDac said:

@download said:
I didn’t get it, why should I put javascript for nav

you do not have to… but currently nav js also contains styling for your nav

you all switched to php just to have a text “solutiongeek” and menu with 2 links?

include what is the same from page to page (you could include navigation or various fixed elements)

asking yourself, “How much of my site is a template (included and unchanging code) and how much of it will vary from page to page?”
in my experience, most professional projects will require more flexibility and less template-ing.

it is very messy. worry about path issues or unnecessary meta-tags.

I told you that it is better to wipe out all and rename folders and files with no space in the name and design a simple page with a useful menu (css)
and then nice sort these pdf files for download in 2-5 pages
you do not need php nor care about the CPU, etc.

only well-organized names and folders !

from the first day you have a problem with the path ( …/ )
there are still many URL in pages on your website that does not lead anywhere
(broken links - because path)

so if some page is on location mydomain/folder1/folder2/test.php

The code in that test.php should be

<?php include '../../header.php';?>

because your header.php is located here http://solutiongeek.in/header.php

thanks oxydac, I will work on my paths and header and nav is working properly now, I changed my header and nav because whenever I add something new in my website like I want to add privacy because of Google Adsense, so in that case I have to change every footer and nav and you said to arrange in 2,3 pages, it is not possible. I did that because of users, it gives them a proper classification for downloading pdf’s

I’m sorry
I forgot that you are in the interest of showing advertisements

It’s good that your site is like a wizards

process from first page up to download is split into several stages.
so you can display more ads per page.

advertisements like text because of the contents of page(text)
it is decided what to show and whether…so be sure to do it on each page

Write some meaningful text by putting in it many keywords
somewhere in the bottom
so it does not disturbing people when choosing a study and semester

@OxyDac said:
I’m sorry
I forgot that you are in the interest of showing advertisements

It’s good that your site is like a wizards

process from first page up to download is split into several stages.
so you can display more ads per page.

advertisements like text because of the contents of page(text)
it is decided what to show and whether…so be sure to do it on each page

Write some meaningful text by putting in it many keywords
somewhere in the bottom
so it does not disturbing people when choosing a study and semester

Thanks for your guidance oxydac you always help me . :smile:

@download said:

@OxyDac said:
I’m sorry
I forgot that you are in the interest of showing advertisements

It’s good that your site is like a wizards

process from first page up to download is split into several stages.
so you can display more ads per page.

advertisements like text because of the contents of page(text)
it is decided what to show and whether…so be sure to do it on each page

Write some meaningful text by putting in it many keywords
somewhere in the bottom
so it does not disturbing people when choosing a study and semester

Thanks for your guidance oxydac you always help me . :smile:

@OxyDac maybe new moderator for your help? Who knows :smiley: :smiley:

@download said:
Thanks for your guidance oxydac you always help me . :smile:

np and yw - hahaha how many times I have been on your website
I feel there as at home :smiley:

@ChrisPAR said:
maybe new moderator

this forum has I think two moderators (bbot and alan)
and both are inactive. I do not know what the security risk is because of that.
but I think admin is disappointed and no longer wants to give people such status
because they disappear after that

@OxyDac said:

@download said:
Thanks for your guidance oxydac you always help me . :smile:

np and yw - hahaha how many times I have been on your website
I feel there as at home :smiley:

@ChrisPAR said:
maybe new moderator

this forum has I think two moderators (bbot and alan)
and both are inactive. I do not know what the security risk is because of that.
but I think admin is disappointed and no longer wants to give people such status
because they disappear after that

Yes I know, this is really sad and Admin is :disappointed: , but if such status was given to any new user, we don’t know what they would do.
If I were a mod here, I would never leave this forum and would basically do what we all do here now, helping people when they need our help about InfinityFree.
Maybe Admin should consider adding a new ranking, Helper, what do you think?

we slowly convert this theme to chit chat - LOL

I do not need any text beside the name (the works speak more)

The only advantage to be a moderator is if they see IP from some user and then they knew if user is behind a VPN or from some country which uses state firewall (censorship)
so it would be easier to know what the problem could be

it’s okay to help anyone and it’s a pleasure to see their lucky faces after that

The most important thing is that you know who you are and how much you are worth

Does your nickname in a forum have status or not is completely irrelevant