Using: .html and Server Side Includes (html files are made executable using .htaccess) Text file is chmod 666. Problem: The php file seems to execute, as the Server Side Include code calling it is not present in the HTML after the page loads. BUT: No ad shows up. There's nothing in the HTML code, as if the script executed, and outputted nothing. Note: Account is not validated, site is not validated. Ad is not present in all files on-site, as I've just started this, but I'd expect something to show up, when the page loads(?) Any clues appreciated.
In the ad_network php file, you should see somethng towards the end that has the stsring ".shtml"... change that to ".html".
Thanks for the speedy reply. It didn't work The ad text file has ads in it, so that part is working, I suppose. How peculiar.
To make darn sure, I put the following code in the php file: if (substr (@$_SERVER['DOCUMENT_NAME'], -6) == '.htm' || substr (@$_SERVER['DOCUMENT_NAME'], -6) == '.html' || substr (@$_SERVER['DOCUMENT_NAME'], -6) == '.shtml') ========= I also noticed that there are inappropriate ads in the .txt file. I specified real estate, and while there's a fair few real estate links, there's more for heart monitors, playing guitar, AIM Buddy icons, Samurai swords and other junk.
All ads are reviewed by a human. Do you have a specific example of an ad you think violates the terms of service?
Its not the ads per se, it's the type. I thought that if I specified a real-estate category for MY one ad, I'd only be serving real-estate ads. Saying it like that, I realise it doesn't follow. My mistake. Thanks for the help. I've got it working now. BUT, I've just put the include code, to call the PHP file, in a PHP file, (commented out ini_set ('zlib.output_compression', 0);, as that was giving a 'headers already set' error,) now the only bug is that the two links showing run into each other i.e. no space or pipe separating them: Example: Scroll to bottom of tigertom.co.uk/real-estate-agent-uk/index.php
I think I'm going mental. I uncommented the zlib call, and now that works fine. Two links are still showing, but the PHP script should be being called only once. That two links are showing consecutively like that suggests the script is putting two ads into the $ad_network scalar, or something. I'm not trying to get two links to display, only one. Peculiar. I know enough about HTML to put a space in, if that was the problem IDEA: Perhaps it's because the file, that I put the PHP call code in, is itself an include file, it's executing twice? Or something, in the code of the PHP file it's included in, is causing it to execute twice?
Yeah, that would be my best guess (that's it's being executed twice for some reason). You are doing the SHTML include just once, right?
The problem page is a PHP one. I'm not using SSI in it. To get the code on all pages on my site, I'm putting it in a footer file, which is called by all the PHP pages of the Open Realty software I'm using. So your PHP script ... is being called by your PHP snippet ... which is in my footer 'include' file .... which my Open Realty software calls. Oh jiminy, I should just put your main PHP script code in my include file, not your snippet that 'calls' it, shouldn't I? Argh! Later: I did it, and it's fine now. Ha! Thanks for your help