Re: Warning: file_get_contents(): Filename cannot be empty

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> > > >
> > > > What happens when you debug your code? What does $convert contain?
> > > > Is it a string containing a URL?
> > > Yes it containing string full path of url of the image like this
> > > (http://www.alsahwa-yemen.net/pic_news/1/1_46777.jpg)
> > >
> > >
> > 
> > Does it definitely contain only that? Because the error you're getting is saying
> > that it isn't a valid URL string and is in-fact an empty string. Have you checked
> > that every single time you're calling it there is actually a valid URL in that
> > variable?
> 
> 
> Yes Ash, I have checked that. It have valid url in the variable $convert, you may try the code in ur system and see by ur self....
> 

I'm not sure how you checked, but I checked and I count 8 instances of
an empty string for $convert when I run your original code.

The cause is that your regular expression is not always producing a
match, so you're imploding on an empty array, creating an empty string.

Thanks,
Ash

http://www.ashleysheridan.co.uk




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux