Change to PHP include?


#1

When I tried to access my site earlier, my browser asked if I wanted to download the page (tried it in both IE and FF). In the .htaccess file I disabled this line:
AddType application/x-httpd-php .php .html
Once I did that, it allowed me to view the page but the php include file is not showing.
This is the line I’ve been using for the includes:

<?php include("/home/user/mydomain.com/inc/header.htm"); It has worked up until now and is still working on several other sites I have on the same DH server. I don't understand why it would work on one site and not on another. Can anyone tell me either what I've done wrong or what has changed recently? Thanks, Hope

#2

You need the following at the end of that php line:
?>
so you can close the PHP statement.

-Scott


#3

Thanks. That was a typo on my part when posting the message. The ?> is at the end of the line in the actual file.

Since posting, I’ve resolved the issue. What I needed to do was change the line in .htaccess to reflect PHP 5. I just don’t understand why it is working on other sites.

Does anyone know when the servers were upgraded to PHP5?


#4

Servers have been PHP5 for quite a long time. However, old PHP4 sites were left intact but any domains that get moved or otherwise reconfigured get bumped to PHP5.

-Scott


#5

How can I find out if my site has been moved? It still shows iceman as the server…


#6

To find out the PHP version a script needs to call phpversion() or you can make a script like so:

<?php phpinfo() ?>Which makes a web page that shows just about everything a developer might want to know.

Customer since 2000 :cool: openvein.org


#7

Thanks. I did that and that’s how I discovered it was PHP5. My question is, why would it stop working if it had been working all along? I have submitted a ticket to support. Hopefully, they will clear up the mystery.

[quote]To find out the PHP version a script needs to call phpversion() or you can make a script like so:

<?php phpinfo() ?>[/quote]