Link to home
Start Free TrialLog in
Avatar of DJ_AM_Juicebox
DJ_AM_Juicebox

asked on

path to element

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
Avatar of hielo
hielo
Flag of Wallis and Futuna image

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>
ASKER CERTIFIED SOLUTION
Avatar of darron_chapman
darron_chapman
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of DJ_AM_Juicebox
DJ_AM_Juicebox

ASKER

@darron_chapman:

that was it

Thanks all