Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Kastlto's avatar

How can I issue an URL which points to a ftp-site

Hi all, I am using laravel for the first time and I got pretty far, but right now I am stuck at the question: How do I issue a link to a ftp site? When I use <a href="ftp://..." in my blade template the href-content gets replaced by weird numbers. That happens as I guess as an effort to generate a local URL. Is there any way to issue a link to a ftp-site?

best regards,

Tobias

0 likes
8 replies
Kastlto's avatar

Okay, of course this page is coded with laravel as well. ;) So my links don't come out right. I entered as href: urlencode("ftp://".$dr->link."/".$dr->link."@".config('app.publichostip'))

and I got as link as what is in my previous post.

But I would like to have: ftp://11111/11111@10.0.50.245

the variables are set correctly of course.

ekhlas's avatar

now what issue cases you to for reach your requirment

Kastlto's avatar

I would like to offer a link to an external ftp server which serves files for the user. I cannot work with http-download, since the user must be able to transfer a directory-structure and not just single files. So the application should provide a ftp-link with logincredentials included.

ekhlas's avatar
<a href="{!!urlencode('ftp://'.$dr->link.'/'.$dr->link.'@'.config('app.publichostip'))!!}"/>

try like above

Kastlto's avatar
Kastlto
OP
Best Answer
Level 1

Okay, my inital fault, sorry for that. I got the ftp-url-syntax wrong. username and password are divided by colon and not by slash. Thank you for your effort! Tobi

Please or to participate in this conversation.