• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Issue How to solve, php include problem?

saleenajohn

New Pleskian
Hello Everyone, I thinks its little relevant question was asked but I'm not satisfied with that. I have a VPS with OS Ubuntu 18.04. I've created a new web hosting to move from another hosting a website with all contents, but I have a issue with the functions include in php. Where I have the function include doesn't show the content. I've checked the code and it's Ok.

I think maybe is problem with my server configuration. Is it?
Thanks in Advance
 
Last edited by a moderator:
How about showing us how you've inserted your include, i.e, does it look like this?
<? include 'nav.php'; ?>, or this: <?php include 'nav.php'; ?>

If you have done it the first of these two ways, you need to have "short_open_tag" set to "On" in the php settings for your domain, or the include won't work.
 
Hello there,
It may happened due to downtime when you migrate website from old hosting to new hosting while URLs leads to the visitors to the old hosting where nothing will be.
Thanks.
 
The include expression includes and evaluates the specified file.

The documentation below also applies to require

Files are included based on the file path given or, if none is given, the include path specified. If the file isn't found in the include path, include will finally check in the calling script's own directory and the current working directory before failing. The include construct will emit an E_WARNING if it cannot find a file; this is different behavior from require, which will emit an E_ERROR. Visit wordfeud helper for more info

Note that both include and require raise additional E_WARNINGs, if the file cannot be accessed, before raising the final E_WARNING or E_ERROR, respectively.
 
Back
Top