---
title: "FTP-fil finns eller inte?"
type: "forum-thread"
url: "https://www.webforum.nu/amne/php/113086-ftp-fil-finns-eller-inte"
topic: "PHP"
topic_url: "https://www.webforum.nu/amne/php"
author: "mikaeled"
published: "2004-10-07T10:52:10.000Z"
updated: "2004-10-07T10:52:10.000Z"
replies: 0
views: 228
page: 1
pages: 1
language: "sv-SE"
site: "webForum — webforum.nu"
rights: "Upphovsrätten till varje inlägg tillhör dess författare."
attribution: "Citera som: webForum, https://www.webforum.nu/amne/php/113086-ftp-fil-finns-eller-inte"
---

# FTP-fil finns eller inte?

## #1 — mikaeled, 2004-10-07T10:52Z

Hej,

Det är så att jag vill ha ett php-script som kontrollerar om en fil på en annan server (ska funka båda med ftp-servrar som i fallet nedan också) finns eller inte.

> if (@fclose(@fopen("ftp://file", "r"))) {   print("ftp://file exists.");   } else {   print("ftp://file does not exist.");   }

Ovan, fungerar endast när det är fil som inte finns på ftp-servrar... 

Tack för framtida hjälp :)

Permalänk: https://www.webforum.nu/p/113086

---

Tråden på webben: https://www.webforum.nu/amne/php/113086-ftp-fil-finns-eller-inte
