hi i have made a sub folder for a program i have done and ive put in in my existing template and now i am attepting to show the logo in it my site is in the public html folder and the logo image is as follows

images/logo/<?php echo SITE_FAVICON; ?>

and program is in sub folder called friend so it goes public_html/friends and so far i have tried

.../images/logo/<?php echo SITE_FAVICON; ?>
    ../images/logo/<?php echo SITE_FAVICON; ?>
    ./images/logo/<?php echo SITE_FAVICON; ?>    
/images/logo/<?php echo SITE_FAVICON; ?>

but nothing seems to be working is there anything i have missed

any help would be greatful

Dani AI

Generated

The behaviour seen in this thread (logo visible only after copying the images into the subfolder) is a classic path-resolution issue, not a browser bug. As found, duplicating the images makes the browser find the file relative to the subfolder, but that’s a workaround that masks the underlying template/path-construction problem. ’s suggestion to open the image URL directly and ’s observation about backslashes point toward two useful diagnostics: confirm the final src value in the page source and verify the server actually returns the image (Network tab / open-in-new-tab).

Common troubleshooting steps and quick checks:

  • Inspect the rendered <img> src in the browser’s “View Source” (or Elements) and open that URL directly to observe the HTTP status.
  • Check for a <base href="..."> in the document head or for a configuration constant that may already contain the full domain; doubling can happen when a full URL is concatenated onto another full URL.
  • Confirm the file exists on disk from the webroot; a server-side existence check removes guesswork. Example PHP pattern (adjust the path to match the server layout):
$fs = $_SERVER['DOCUMENT_ROOT'] . '/static/logo.png';
if (file_exists($fs)) {
  echo '<img src="/static/logo.png" alt="site logo">';
} else {
  error_log("Missing logo: $fs");
}

Likely causes of the “double-domain” or odd slashes: a base/config value already containing the protocol+host that gets prepended again, string concatenation with stray backslashes, or an incorrectly set <base> tag. A robust fix is to centralize the asset URL, trim trailing slashes, and use root-relative paths for static assets. Example safe concatenation:

$base = rtrim(BASE_URL, '/');
echo $base . '/static/logo.png';

Copying the images into the subfolder works but creates duplication and maintenance overhead. The durable solution is to fix the path generation (or use a single, well-defined base URL) and confirm via browser devtools that the final src is reachable and returns 200 OK.

Recommended Answers

All 6 Replies

Can you open the logo link directly from the browser address bar? For example:


What is the value of SITE_FAVICON?

the site_favicon came when i brought the script hun so aint got any idea hun

ive tried the following replacing the website with my own and its still playing up

href="/images/logo/1356093952logo.gif">
href="images/logo/1356093952logo.gif">
href=""/>

and when i check the image information i get the following :
http://www.website.com/www.website.com/images/logo/logo.png

thats whats blowing my mind cant understand why its showing website twice

sorted it just copied images folder in sub folder for script and it works

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.