PHP Content not loaded from MySql, but no error [closed] - php

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 6 years ago.
Improve this question
I am working on some sort of blogging platform in php with a nice material design lite frontend. However I have a page that dynamically loads the content, it works fine in the root directory, but not in my admin directory. I hope you can spot some kind of error/typo in my code, I know the error is in the menu-start file, since disabling it enables loading.
Here is the page that loads the code
and here is the menu-start page
If you need any other code, please ask

You're using relative links for include, which will mess up when you start changing directories. Use a pseudo-absolute path with DOCUMENT_ROOT. Be sure to use this for all of your includes.
<?php include $_SERVER['DOCUMENT_ROOT'].'/menu-start.php'; ?>

Related

HTML5 Responsive one page site with php variables in url [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 2 years ago.
Improve this question
I have just built a responsive HTML5 page, and as such, it links to other parts of the page from the menu... so, I have #home, #about, etc. I also need to pass a php variable for language, so that the correct language displays on the page, so I have lang=es, lang=gb, etc.
The languages are working fine and the links are working fine, but when I combine them both, the links stop working. Either as #about?lang=es or as index.php#about?lang=es. Neither works. It just stays at the top of the page and doesn't jump.
Any clues as to why?
Thanks in advance.
Kirsty
You should pass the php params first and then html tag ID
see the example below
https://domain.extension?lang=es#about
Dont worry about php variable value, it will remain untouched, servers will handle it

Open cart footer.twig file changes not reflecting [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 5 years ago.
Improve this question
I am working on a site http://www.lemongrasshouse.com.au/ i am changing code inside /public_html/lemongrasshouse.com.au/catalog/view/theme/lemongrasshouse/template/common/footer.twig
but its not affecting the site.
Can anyone help me in this matter
Thanks
Somdeb
Have you also edited that twig file via the built in editor in Design > Theme Editor? If so, it will use that one (which is stored in the database) rather than the file itself.

how can I load my urls and page without the whole browser loading in laravel [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 5 years ago.
Improve this question
pls im looking for a new way to load my urls and pages in laravel, i want the url to change and the webpage to change but i do not want the whole browser to load, some examples are like soundcloud.com, wakanow.com, https://www.indiehackers.com/businesses, even linkedin has the same feature, where the pages load like desktop apps and they have nice preolading animations that works with the page, i believe this will be helpful to other people too :)

Change relative urls to absolute in an html document using DOMDocument [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 7 years ago.
Improve this question
I am using curl to get some html pages in strings, but I have a problem when i display it , it doesn't show the images nor the css ,let say
the data have this
want to get modified to
thanks!
I want it to modify the whole html page ...
You can use wget with the -k option. Or just see the answers here.
Your problem is that links to images and stylesheets are relative instead of absolute, so your browser doesn't know the real origin of the page when displaying it. A quick fix would be to add
<base href="http://domain.com" />
(with the real originating domain) in the head of your page prior to displaying it.

Code for set the url as usernameq [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 8 years ago.
Improve this question
I use a code to set the URL as:
http://domainname.com/user
The problem is that I use some masks in my .htaccess, so what we see in the URL is not always the real path of the file.
What I need is to get the URL, what is written in the URL, nothing more and nothing less—the full URL.
I need to get how it appears in the Navigation Bar in the web browser, and not the real path of the file on the server.
You need to simple check in PHP what's the value of $_SERVER['REQUEST_URI']
or substr($_SERVER['REQUEST_URI'],1) if you want to remove leading slash

Categories