> -----Original Message----- > From: Ashley Sheridan [mailto:ash@xxxxxxxxxxxxxxxxxxxx] > Sent: Monday, March 09, 2015 1:03 PM > To: hadi > Cc: 'Marcos Almeida Azevedo'; 'PHP General' > Subject: Re: Warning: file_get_contents(): Filename cannot be empty > > > > > > > > > > > > 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. Thanking you Ash for checking my code. But what to do to fix this error.... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php