简体   繁体   中英

I can't see a php include page

I have an included php page into index.html.

<?php include "inc/header.php";?>

Dreamveawer cs5 is configured for viewing via wamp server.
On f12 I can't see this included file (only index.html is viewed, without includes)
If I open header.php itself - f12 - works well.
What could be the reason, please.

index.html is an HTML file, so PHP won't be parsed. Name the file index.php instead.

It's likely that the file cannot be located. I suspect if you change include to require , you will see a relevant error message. You need to either change the path you are trying to include, or change your include_path variable:

set_include_path("/path/to/your/lib/" . DIRECTORY_SEPERATOR . get_include_path());

edit As commenters noted elsewhere, this only applies if your main file is being interpreted through PHP.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM