You are here: Re: File? « PHP Programming Language « IT news, forums, messages
Re: File?

Posted by Erwin Moller on 05/29/06 14:24

r.knipscheer@home.nl wrote:

> Hi,
>
> i've written a function to check if an image on a server exists:
> i send the url to check to the function and check it with:
>
> $file = @file ($url);
> if ($file) {
>
> this works ok, as long as i use it on my computer. As soon as i upload
> it to my webserver this function won't work. Is this a known security
> issue?
>
> Thank you.
>
> Rotsj

Did you read php.net on the subject?

http://nl2.php.net/manual/en/function.file.php

(or just go to www.php.net, and type file into the searchbox)

It contains a warning about using url-wrappers.
Maybe that is the problem.

And also: File() is ment to retrieve an array with lines, not very fitting
for an image IMHO.
So file() isn't the right function to take in an imagefile (allthough it
might work allright).

Regards,
Erwin Moller

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация