Solved

path to element

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

760 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

23 Experts available now in Live!

Get 1:1 Help Now