This might be a strange thought, but how about a simple workaround: Make a DIRECTORY with the same name as the .cgi file that the code points to. Then use an index.php3 file of that directory for your PHP code. You will have to make sure that Apache's (or whatever webserver) configuration file makes an index out of .php3 files, and your users will never know the difference:

To get all .html files checked by the PHP parser, you simply need to edit httpd.conf (again I am assuming Apache) and add .html to the PHP3 configuration area:

AddType application/x-httpd-php3 .php3 .phtml (you would add .html)

I would recommend you think carefully about doing this, though, because it makes PHP parse *every* web page on your site, whether its got PHP code or not, which will put a big load on your processor. And if this is a global configuration file, then PHP will have to parse every page on all 200 sites. I don't know an easy answer to this one.

That thing about having it as a directory index is a good idea, I currently use lots of .htaccess files to make sure the correct file is shown for the index, I just hope the extension won't confuse it. I recently updated the code and used exactly this trick so that I could use what ever technology I wanted.

I doubt I will be able to get the .html files through the parser because I don't run the server. I read somewhere that search engines don't always index .php3 files, and I was going to make it so that .htm was pure html and .html would be php3 files.

You are so correct sir... a simple redirect, the obvious solution. But you've got to admit my idea was kinda fun, and it might have its uses.

Lemming -- find out if your server can parse server-side includes in regular .html files (instead of only .shtml files) then you can call your .php3 scripts INTO your .html files and the search engines will be none the wiser.

OK, so have can get round my original problem either way, but I now have a new problem - I want to read and write text files using PHP3. This is only temporary, and I know how to access MySQL using perl, but that needs my hosting company to upgrade something, and they are not that fast at responding to requests like this.

Thanks. I had looked for the same on devshed but I was sure I couldn't find anything (even if it was right under my nose). Anyway, they have dead links, and so do devshed, but I had the old manual pages bookmarked. Now I should hopefully be able to get this working :-)

OK, those could do with being alot cleared. For instance when you are told that the code for an arrar is
"array array(...);"
it isn't too helpful. Might be OK if you know the language, but if you know the language you don't need it.
Anyway, can anybody see the problem in this code:
<?
$lemnet = file(string german.txt);
print "$lemnet";
?>

the german.txt file exists and is in the same directory as the php file.

My problem now is that I can't find anyway to get a value from an array. I have tried $name[0], @name[0], $name(0) and many others, bot nothing seems to work and I can't find any mention of it in the manual (despite an entire section for arrays).

Well, that's really not enough information to solve your problem. Arrays are referred to with brackets, i.e. $name[0] so that is correct. When you say it doesn't work do you mean you are getting an error, you don't get the value you expect, what?
<?
$name[]='Bill';
$name[]='Hillary';
$name[]='Al';
$name[]='Tipper';
$name[jerk]=$name[0];