In an upload script, I have
$destination = $_SERVER['DOCUMENT_ROOT'] . '/uploads/'. $_SESSION['username'] . '/entries/' . '/' . $year . '/';
and i upload the image path to the database, and thus the string stores is the real_path(ie. S:\sites\www\mysite\uploads\username\entries\2011\file.png)
is there a function that converts that real path into “http://sitename/uploads…”
althought not hard to implement, i was wondering if there is a built-in one. i looked in the docs but couldn’t find anything.
Looks like all you need to do is build your path differently.