0

Hi Im having trouble getting the content of the file from a url. Here is my code:

$link = file_get_contents("https://website.com/s/File-Name-Ext.xls");

I know the hypens are the one causing the error but I dont know what value to replace on this. Any suggestion will be a big help. Thanks.

liyooooooooo
  • 85
  • 1
  • 6
  • Does this answer your question? [How to properly URL encode a string in PHP?](https://stackoverflow.com/questions/4744888/how-to-properly-url-encode-a-string-in-php) – handras Jun 25 '20 at 09:39
  • Hi, this doesn't answer my question. What I did is replace hyphens to "%2D" on the link. When I type the link on the browser it is working but when I used it on my codes it's not. – liyooooooooo Jun 30 '20 at 02:09

0 Answers0