PDA

View Full Version : Errors


PGN
Sun 19th Jun '05, 8:14pm
1. It won't include the image in header.inc when I open index.php in the /services/ folder
2. When I am using index.php in the /services/ directory, it doesn't take me to the index.php in my root folder when I click home, and all the other links in the navagation bar just flat out don't work.

I hope someone is nice enough to work for free, because I'm broke...

PGN
Sun 19th Jun '05, 8:24pm
Sorry, I forgot to attach it :embarrased:

Silverwolf
Mon 20th Jun '05, 4:46am
I'm sorta confused as to what you're problem is. You're saying that you're sticking this index.php file at http://www.yoursite.com/services/index.php? And you're saying that the image isn't showing up when you include the header.inc, and the links are supposed to link back to the main website?

...Assuming I got that right, it just requires a few small changes :)

First, it appears that there is no images/ directory to take the trenttech.gif from. Instead of this:

<img src="images/trenttech.gif" alt="TrentTech" height="78" width="340"0"></img>
You might try something like this:
<img src="/trenttech.gif" alt="TrentTech" height="78" width="340" />

And as for the links, all you need is a leading slash:

<td><a href="/index.php">Home</a>
<td><a href="/support.php">Support</a>
<td><a href="/services">Services</a>
<td><a href="/forums">Forums</a>

Hope I was of help :)

Regards,
- Silver

PGN
Mon 20th Jun '05, 9:25am
But the thing is, then only things in the /services/ directory will have working links and a working image, the things in the root directory won't work. This is because header.inc is for the root directory AND the /services/ directory

Marco van Herwaarden
Mon 20th Jun '05, 9:46am
The files you are showing in the above zip-file, seem to be about another product then vB, or they are an addon to vB.

For support on them, i suggest you ask at teh site where you got them.

PGN
Mon 20th Jun '05, 3:47pm
No, it's my website that I'm making, and I need help with the PHP in it. That's why it's posted in the PHP forum

Silverwolf
Mon 20th Jun '05, 6:03pm
But the thing is, then only things in the /services/ directory will have working links and a working image, the things in the root directory won't work. This is because header.inc is for the root directory AND the /services/ directory
I tried this on my local machine and found that it worked just fine :). Since the header.inc is calling trenttech.gif from the root directory (I'm assuming that's where it is), it will work for both /services/ and root. And also, the links should work all fine and dandy for both.

PGN
Mon 20th Jun '05, 6:27pm
For me, when I am running index.php in the /services/ directory, the links come up with "Not Found" pages, and the image is broken...do you know what the problem is?

Silverwolf
Mon 20th Jun '05, 6:39pm
I'm not quite sure what the problem may be then. In the assumption that all the files you want the links to go to are in the root directory, the changes I suggested should have worked. But just for the record, your document-tree looks something like this, yes?
footer.inc
header.inc
index.php
trenttech.gif
/services
index.php
vbulletin.php ...And the index.php is calling the header.inc from the root directory. With the changes that I suggested, the header.inc SHOULD be calling the root directory's trenttech.gif. Also, the leading slashes in the links should take you back to the main dir and to the index.php, etc. etc.