N
N
Nikolai Novosad2016-03-16 23:47:18
PHP
Nikolai Novosad, 2016-03-16 23:47:18

include header.php?

Hello.
You need to include header.php in include_test.php file.
Header.php is on the server. I write like this:

include 'http://www.site.com/wp-content/themes/template/header.php';

and get 500 error - Server Error. And even if I move header.php to the root, I get a 500 error. When I created a simple hello.php file with hello, world, the include went fine.
Where am I doing wrong?
Thanks in advance.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
F
frolovss, 2016-03-16
@frolovss

www.php.su/include
namely:
In order for remote inclusion of files to be available, it is necessary to set allow_url_fopen=1 in the configuration file (php.ini).

C
CrewCut, 2016-03-17
@CrewCut

The path must be full, relative to the server.

A
Al Sm, 2016-03-17
@radio_mus

Use __DIR__

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question