[pmwiki-devel] Files as URLs or local file system names?
Petko Yotov
5ko at 5ko.fr
Wed Apr 15 21:45:07 PDT 2026
After you call DownloadUrl() the global variable $FmtV['$PathUpload']
contains the relative filesystem path to the file.
So, something like this:
# $fname is the part after Attach: in Attach:Group.Page/file.gpx
$url = DownloadUrl($pagename, $fname);
global $FmtV;
$filepath = $FmtV['$PathUpload'];
$object = simplexml_load_file($filepath);
Petko
--
If you upgrade : https://www.pmwiki.org/Upgrades
On 16/04/2026 00:32, Simon wrote:
> I've got a file such as
> "uploads/GPSTracks/HomePage/2026-04-15%20TTC%20York%20bay%20bush%20tracks%20final.gpx"
> On this webhost "allow_url_fopen" is not enabled
>
> I'm actually only interested in the local file (i.e. I'm not
> interested in accessing it as a URL).
>
> I'm using the built in \DownloadUrl ($pagename, $wikifilename)
> to then call simplexml_load_file($wikifilefqdn)
>
> How can I find the local file system name instead of the URL?
More information about the pmwiki-devel
mailing list