Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

include a https

Status
Not open for further replies.

Murugs

Technical User
Joined
Jun 24, 2002
Messages
549
Location
US
I am using a statement
include test.php in my program which works fine.

But I want to do like this below

include '
I have https on my website which also works fine.
My php file should point to a htpps connection.
I get error when I run the above statement

Warning: main( failed to open stream: No such file or directory in...

Warning: main(): Failed opening for inclusion

Is it not possible for me to include a https.

MP
 
I don't understand why you would connect to your own server using http or https if the PHP is interpreted on the same machine. Am I missing somthing?
 
I am accepting credit card information on the website. So I want it to go to a https. Did I answer your question.
regards
MP
 
Yes, you answered the question.
How do people get to that particular script? Do they click a link?
What I recommend is to have the "secure" be linked to from a link that specified https. The script then checks if the URL was accessed by https and if not redirect to itself with a header directive that spells out https as the required protocol.
I don't think the include way is the correct way to think about this. If anything would be encrypted then it is only the connection that includes the requested file.
 
Yes script is on same server..

"If so, don't use include with a URL. Just include the filesystem filename."

How do I do this ?

regards
MP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top