Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

Include files in http but not in https

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 01-29-2003, 04:51 AM
  shan's Avatar 
shan shan is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Birmingham, UK
Posts: 6,163
 

Default Include files in http but not in https

Anyone have any ideas about this.

I have just finished a design for a client who wanted to use some banners on either side and below the site.

The problem is is that the banners are linked to externaly stored images and so when the cart goes over to https there will be a warning that not all the content of the page is secure.

So how would I add a little else if command to say

Code:
If were in http include the files else dont

you get the idea
__________________
Looking for a reliable X-cart host ?
You wont go wrong with either of these.

EWD Hosting
Hands On Hosting
Reply With Quote
  #2  
Old 01-29-2003, 12:09 PM
 
funkydunk funkydunk is offline
 

X-Man
  
Join Date: Oct 2002
Location: Cambridge, UK
Posts: 2,210
 

Default

In PHP try something like:

Code:
<?php if ($_SERVER['SERVER_PORT']=='80'){ // check to see if running on http include ("file.php"); } ?>

This should work in version 4.1 onwards of PHP
__________________
ex x-cart guru
Reply With Quote
  #3  
Old 01-29-2003, 12:12 PM
 
funkydunk funkydunk is offline
 

X-Man
  
Join Date: Oct 2002
Location: Cambridge, UK
Posts: 2,210
 

Default

Or:

Code:
<?php if ($HTTP_SERVER_VARS['SERVER_PORT']=='80'){ // check to see if running on http include ("file.php"); } ?> This assumes Globals is switched on.
__________________
ex x-cart guru
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 01:01 AM.

   

 
X-Cart forums © 2001-2020