X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Include files in http but not in https (https://forum.x-cart.com/showthread.php?t=1318)

shan 01-29-2003 04:51 AM

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 ;-)

funkydunk 01-29-2003 12:09 PM

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

funkydunk 01-29-2003 12:12 PM

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.



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

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.