0

I have a question. I need to get data from this url /wd/biling.php?get&id=1.I now that this url return the liste serialize. I tried to retrieve by using $data= file_get_contents('/wd/biling.php?get&id=1'); but I have the error : Failed to open stream. Can you help me please ?

Harea Costicla
  • 797
  • 3
  • 9
  • 20

1 Answers1

1

URLs can only be passed as absolute(with Protocol+Host+Path). try:

 file_get_contents('http[s]://domain/path');

Also if your loading any local content this way, you might be doing something wrong. We use include or require to run local php files. You can use this way.

 $id = 1;
 include('/wd/biling.php');

now in biling.php you can use $id just like that.

anwerj
  • 2,386
  • 2
  • 17
  • 36