Haha thats what I thought but it seems to work on the server. Strange php.ini config I guess, but I'm sure the settings have been set for a reason - most probably security, rather than just to be awkward.
I'm checking out OpenX as this seems like a much more comprehensive approach to what I'm...
After further research I found the following, which has helped a little:
<?php
$includeFile = file_get_contents("http://www.domain.com/manager/display/?cat=1&count=2");
echo $includeFile;
?>
It is including the ads and displaying 2 of them (count=2), but no actual ad contents are being...
I do get errors - 2 of them. The code:
<?php include $_SERVER['DOCUMENT_ROOT'] . '/manager/display/?cat=1&count=2'; ?>
... results in the following errors to be output into the document.
Warning: include(/home/ACCOUNT/public_html/manager/display/?cat=1&count=2) [function.include]: failed to...
According to the color-coding of my code in EditPlus, it seems to be the equals sign in the dynamic URL that is causing the problems. Without these, eg. with a url to a static page, the color-coding appears fine.
Maybe there is an alternative to get around this issue? Another symbol? Escaping...
Thanks Phil. I see your point.
Before the upgrade this worked fine, even tho no actual file is called. That is, using
<? include('http://www.domain.com/manager/display/?cat=1&count=2'); ?>
I guess it 'assumed' to use index.php at http://www.domain.com/manager/display/ - the only file within...
Apologies if I'm confusing. This isn't my strong point lol. It's a script that handles ads for the site, delivering specific ads based on the category being viewed. So, in that sense, I think it makes perfect sense.
I'll have a play around with the php.ini for now for a quick fix but I'd...
Thanks. I'd already considered that, but isn't that avoiding the whole PHP5 compliance issue as well as the question/what I'm trying to get at?
For example, should I need to move to a server that doesn't allow you to edit your own php.ini I'd be stuffed.
Is there actually a way to call a...
Ah, that's exactly what I was doing up until the php5 server upgrade. This seemed to stop working after the upgrade so I began using the php5-compliant alternative.
Using your suggested include results in the following error:
Warning: include() [function.include]: URL file-access is disabled in...
Thanks for the prompt response. Can you elaborate on your post? This form of include is new to me.
The script is hosted locally, so I'm unsure as to why the above doesn't work? The path to the script is at the exact location as the above include would suggest - ie...
I'm having a propblem with an old(ish) script I use for Ad Serving on a small site. It all happened when the server was upgraded to PHP5.
I used PHP includes to call common features of the site - headers, footers etc. and the script used PHP includes to call ads from the relevant category...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.