Solved

path to element

Posted on 2007-11-19
3
172 Views
Last Modified: 2008-03-06
Hi,

I am using a CMS system which generates an html page dynamically. I echo'd out the path it thinks it's using and I'm left with the following:

    /home/mysite/public_html/index.php
 
I have an applet class sitting at:

    public_html/test/applet.class

so shouldn't I be able to link to it directly in the page by doing:

    <applet code=test/applet.class width=400 height=400></applet>

I can't seem to resolve the path....

Thanks
0
Comment
Question by:DJ_AM_Juicebox
3 Comments
 
LVL 82

Expert Comment

by:hielo
ID: 20317421
Using the absolute path on the links will not help because only the server knows how to search for it. You need to use relative paths. Try:
$_SERVER['SCRIPT_FILENAME']

EX:
<a href="<?php echo($_SERVER['SCRIPT_FILENAME']) ?>">Some link </a>
0
 
LVL 19

Accepted Solution

by:
darron_chapman earned 500 total points
ID: 20317438
<applet code="applet.class" codebase="test/" width=400 height=400></applet>
0
 

Author Comment

by:DJ_AM_Juicebox
ID: 20317452
@darron_chapman:

that was it

Thanks all
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
WordPress syntax 2 27
Footer at the bottom of the page not centered 5 29
PHP warning 4 30
Need Wordpress help to link from outside to image item number. 6 20
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
This article discusses how to create an extensible mechanism for linked drop downs.
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

896 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now