-1

I have a PDF converter button that works fine for http requests.

$this->url ='http://'.$_SERVER['SERVER_NAME'].':'.$_SERVER['SERVER_PORT'].str_replace(DIRECTORY_SEPARATOR , $relativePath , '/' );

However I need to make it work for a https request as well.

Any help would be appreciated.

Aditya Jain
  • 1,077
  • 1
  • 12
  • 25

1 Answers1

0

You have issues fetching the protocol from what i can see. Check this question: PHP Get Site URL Protocol - http vs https

Community
  • 1
  • 1
Andrei Stanca
  • 908
  • 2
  • 11
  • 26