![]() |
![]() ![]() |
![]() |
![]()
Post
#1
|
|
![]() Grupa: Zarejestrowani Postów: 566 Pomógł: 18 Dołączył: 23.08.2003 Skąd: Łomża Ostrzeżenie: (0%) ![]() ![]() |
siema. napisalem taki kodzik i mam pyt czy macie lepszy pomysl na rozwiazanie tego problemu. problem jest taki, ze chce sprawdzic czy plik istnieje ale na innym servie... moj kod:
[php:1:1d41da408e]<?php if (@fopen($vars->file_url),"r")){ //plik istnieje } else { //plik nie istnieje } ?>[/php:1:1d41da408e] -------------------- *Note: No animals were killed durning the construction of this post.
|
|
|
![]()
Post
#2
|
|
![]() Grupa: Przyjaciele php.pl Postów: 1 717 Pomógł: 0 Dołączył: 12.06.2002 Skąd: Wolsztyn..... Studia: Zielona Góra Ostrzeżenie: (0%) ![]() ![]() |
Cytat If you are trying to check whether a remote file (or url) exists, you can open it and close it in the same statement.
[php:1:d84fd24dbe]<?php if (@fclose(@fopen("http://www.example.com", "r"))) { print("File exists."); } else { print("File does not exist."); } ?>[/php:1:d84fd24dbe] -------------------- Brak czasu :/
|
|
|
![]() ![]() |
![]() |
Aktualny czas: 19.08.2025 - 08:46 |