I am fairly new so firstly please excuse me if I am doing anything wrong.
I have build a website for my friend, using the same techniques as I used for my own, yet with his host the .php files are not being read/picked up.
Is PHP a CGI or Apache module?
PHP runs as a cgi at Duport Associates Limited – this is because it is
more secure than running it as an Apache module (if it runs as an
Apache module PHP runs as the same user with the same rights as
Apache).This means that php_value directives in .htaccess files will not work
– however we do allow local php.ini (or php4.ini for php4) files – these are plain text files that allow php.ini directives to control
PHP for scripts in the directory where the file is placed, and its
subdirectories.Additionally, .htaccess directives such as AddHandler .php x-httpd-php
will break your PHP scripts.
^^ I get this message when searching their help page.
At this moment my code looks like this:
<?php include('http://www.amberstoneinc.co.uk/php/html/start.php'); ?>
<?php include('http://www.amberstoneinc.co.uk/php/head/index.php'); ?>
<body class="index">
<div class="container">
<?php include("www.amberstoneinc.co.uk/php/nav/en.php"); ?>
<div class="index-section">
<?php include("http://www.amberstoneinc.co.uk/php/content/index.php"); ?>
<div class="clear"></div>
</div>
<div class="clear"></div>
</div>
<?php include("http://www.amberstoneinc.co.uk/php/bg/index.php"); ?>
</body>
Can someone please help by explaining what I should do?
You are attempting to
includevia a full URL. Not only is this a very bad idea and the functionality will likely be disabled (I would hope it is anyway), it would most likely not do what you expected even if it did work.Your code should be (educated guess, may not be exactly right) this:
To learn exactly why this is, you should read this thoroughly.
In order to see a useful error message when things go wrong, you should add this to the top of the page while developing: