Errors regarding php

Hi, why am I getting this error:
Failed to load resource: the server responded with a status of 404 ()

when I wrote this:

<?php include 'test/menu4.php' ?>

It happens only when i use that php include function inside a php file, why that? On other websites I’ve done the same and it does work, on other websites it just doesn’t seem to work for that error written above.

  • Tim



Because probably that file does not exist in that location

1 Like

It’s inside folder test, named menu4 which is php. So it is correct.

In which location is the file in which you put that include? is it in a subdir?

In my file “historyandfutureweather.php”
ndfutureweather.php", I’m writing in PHP include ‘test/menu4.php’.
Test is a folder, menu4.php is a file(image two)

404 - that file does not exist

if I guessed your domain right

In the future, please take a screenshot of the FTP client and files from hosting and not from gdrive

make sure that all the necessary files are uploaded on the hosting
and only then can we talk about further problems


Try to put it like this
<?php include '/test/menu4.php' ?>
once you upload that history…xy.xyx.php

Yes, I uploaded all the files that are needed but this <?php include '/test/menu4.php' ?> just doesn’t seem to work. Now I get that error: “Node could not be resolved to a valid node.”…

You can check out for yourself:
There’s no ERROR or whatsoever in console log but when I try hitting that “more” at the top, it doesn’t open a dropdown list…
also only include function seems to “destroy” the code it will not work for some reason. I checked through the internet how include func. it’s done, I checked it all. But it simply doesn’t work for I’m not sure what reason:(

If I write two include functions within a single page, include function works. If there’s just ONE include, it doesn’t work… that’s weird :frowning::confounded::disappointed:

you call one and the same file 2x+ ?
include_once when you do not want a file included multiple times (avoiding duplication problem).

OK - I didn’t correctly guess which domain you are talking about, so please provide all the necessary information next time when you have a problem.


Okay I’ll thanks. And I called same include ‘test/menu4.php’ function two times, so i included that menu4.php two times in order to make it work…


This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.