Let’s say I want this:
http://example.com/kirby-route/C:\some\path\file@name.txt
Stack overflow gave me an answer that I can use rawurlencode, but it does not work with Kirby Routes. Any way around it?
I prefer $_GET
over $_POST
because it’s easy to test.
More info:
php, get, decode, encode
@Jens That depends on how your server processes the request, or what else you’re doing with that URL, which we obviously don’t know.
Why do you want to do this? Please note that using full paths will almost always come with security issues.
I’m building a new plugin. Maybe you expected the Revsions plugin to be released, but when working on it I found out that I want a file explorer field first to help me debug the Revisions field.
Revealing the file paths is probably a risk but:
I will only allow viewing of txt|jpg|png|bmp|jpeg|md|yaml|yml
files.
No files could be deleted or edited except for what the panel already allows by page edit and delete.
The field is made for developers and should probably not be on the live server for “normal” users.
I’m using $_POST
instead and it’s fine!
Thanks!
3 Likes