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.
After the upgrade my site broke, so I started using the include document root instead of my usual PHP includes: php include _server 'document_root' . 'inc/header.php';
That works fine, although the line that calls the script seems to not work.
I use EditPlus for editing code and the equals (=) sign within the dynamic URL causes the colour-coding to go pink - as in 'something isn't right here'. I assume that's what's causing the problem.
Here's the code:
The error code I'm getting is:
Warning: include(/home/ukmusicp/public_html/manager/display/?cat=1&count=2) [function.include]: failed to open stream: No such file or directory in /home/ukmusicp/public_html/index.html on line 80
is line 80 of index.html in the public root.
Any ideas on how I can fix this?
Many thanks!
Ashley
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.
After the upgrade my site broke, so I started using the include document root instead of my usual PHP includes: php include _server 'document_root' . 'inc/header.php';
That works fine, although the line that calls the script seems to not work.
I use EditPlus for editing code and the equals (=) sign within the dynamic URL causes the colour-coding to go pink - as in 'something isn't right here'. I assume that's what's causing the problem.
Here's the code:
Code:
<div class="featured">
<h2><?php include $_SERVER['DOCUMENT_ROOT'] . '/inc/featured-title.php'; ?></h2>
<ul>
<?php include $_SERVER['DOCUMENT_ROOT'] . '/manager/display/?cat=1&count=2'; ?>
<br /><br />
<li><?php include $_SERVER['DOCUMENT_ROOT'] . '/inc/want-to-be-listed.php'; ?></li>
</ul>
</div>
The error code I'm getting is:
Warning: include(/home/ukmusicp/public_html/manager/display/?cat=1&count=2) [function.include]: failed to open stream: No such file or directory in /home/ukmusicp/public_html/index.html on line 80
Code:
<?php include $_SERVER['DOCUMENT_ROOT'] . '/manager/display/?cat=1&count=2'; ?>
Any ideas on how I can fix this?
Many thanks!
Ashley