Solved

path to element

Posted on 2007-11-19
3
174 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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Alert after MVC form submitted 1 22
Wordpress Pagination 1 28
Wordpress Query 5 25
..ignore the Question 1 5
This article discusses how to create an extensible mechanism for linked drop downs.
Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

809 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