- 积分
- 4
- 威望
-
- 金钱
-
- 注册时间
- 2012-4-29
- 在线时间
- 小时
- 最后登录
- 1970-1-1
|
服务器探针:http://www.eck100.com:82/p.php
我装的是LIUNX CENTOS 5.7版 Linux 内核版本:2.6.18-308.4.1.el5
我用的是ECSHOP 程 序 ,我在SERVER 2008系统 就能正常使用.
我做了个脚本在ECSHOP 的JS 目录下,COMMON.JS 这里是调用网站的CSS 样式文件关键 .它在 IIS7 +php5+ mysql5.2下是正常使用的.
php模式是 IASP
测试郊果:http://oneck1.com:82 http://buy.oneck1.com:82/ 很正常的使用.
但是在 liunx CENTOS 下装上LNMP 0.9 后. 调用的JS 全不生郊,但是装上ECSHOP 原版是正常 的.
测试郊果: http://mall.oneck1.com http://www.eck100.com:82/ 不能调用CSS 文件.
我写的调用脚本是:
在JS 目录下: common.js 写上
if (window.navigator.userAgent.indexOf("MSIE 6.0")>=1)
//如果浏览器为IE 6.0
{
var IE800="MSIE6.0/Small/main.css";
var IE1024="MSIE6.0/Small/main.css";
var IE1152="MSIE6.0/Small/main.css";
var IE1280="MSIE6.0/Large/main.css";
var IE1360="MSIE6.0/Large/main.css";
var IE1366="MSIE6.0/Large/main.css";
var IE1440="MSIE6.0/Large/main.css";
var IE1600="MSIE6.0/Large/main.css";
var IE1680="MSIE6.0/Large/main.css";
var IE1920="MSIE6.0/Large/main.css";
var IEother="MSIE6.0/Large/main.css";
ScreenWidth(IE800,IE1024,IE1152,IE1280,IE1360,IE1366,IE1440,IE1600,IE1680,IE1920,IEother)
}else{
if (window.navigator.userAgent.indexOf("MSIE 8.0")>=1)
{
//如果浏览器为IE 8.0
var IE800="MSIE8.0/Small/main.css";
var IE1024="MSIE8.0/Small/main.css";
var IE1152="MSIE8.0/Small/main.css";
var IE1280="MSIE8.0/Large/main.css";
var IE1360="MSIE8.0/Large/main.css";
var IE1366="MSIE8.0/Large/main.css";
var IE1440="MSIE8.0/Large/main.css";
var IE1600="MSIE8.0/Large/main.css";
var IE1680="MSIE8.0/Large/main.css";
var IE1920="MSIE8.0/Large/main.css";
var IEother="MSIE8.0/Large/main.css";
ScreenWidth(IE800,IE1024,IE1152,IE1280,IE1360,IE1366,IE1440,IE1600,IE1680,IE1920,IEother)
}else{
//如果浏览器为其他
var Other800="Other/Small/style.css";
var Other1024="Other/Small/style.css";
var Other1152="Other/Small/style.css";
var Other1280="Other/Large/style.css";
var Other1360="Other/Large/style.css";
var Other1366="Other/Large/style.css";
var Other1440="Other/Large/style.css";
var Other1600="Other/Large/style.css";
var Other1680="Other/Large/style.css";
var Other1920="Other/Large/style.css";
var Otherother="Other/Large/style.css";
ScreenWidth(Other800,Other1024,Other1152,Other1280,Other1360,Other1366,Other1440,Other1600,Other1680,Other1920,Otherother)
}
}
function ScreenWidth(CSS1,CSS2,CSS3,CSS4,CSS5,CSS6,CSS7,CSS8,CSS9,CSS10,CSS11)
{
if ((screen.width == 800) && (screen.height == 600)){
setActiveStyleSheet(CSS1);
}else{
if ((screen.width == 1024) && (screen.height == 600,768)){
setActiveStyleSheet(CSS2);
}else{
if ((screen.width == 1152) && (screen.height == 864)){
setActiveStyleSheet(CSS3);
}else{
if ((screen.width == 1280) && (screen.height == 720,768,800,960,1024)){
setActiveStyleSheet(CSS4);
}else{
if ((screen.width == 1360) && (screen.height == 600,768,800)){
setActiveStyleSheet(CSS5);
}else{
if ((screen.width == 1366) && (screen.height == 600,768,800)){
setActiveStyleSheet(CSS6);
}else{
if ((screen.width == 1440) && (screen.height == 900)){
setActiveStyleSheet(CSS7);
}else{
if ((screen.width == 1600) && (screen.height == 1050,1050,1024)){
setActiveStyleSheet(CSS8);
}else{
if ((screen.width == 1680) && (screen.height == 1050,1050,1024)){
setActiveStyleSheet(CSS9);
}else{
if ((screen.width == 1920) && (screen.height == 1080)){
setActiveStyleSheet(CSS10);
}else{
setActiveStyleSheet(CSS11);
}}}}}}}}}}}
function setActiveStyleSheet(title){
document.getElementsByTagName("link")[0].href="themes/B2C/css/"+title;
}
调用主法是: 在 index.dwt 这样加上: <link href="" rel="stylesheet" type="text/css" />
下面插入脚 本:
{* 包含脚本文件 *}
{insert_scripts files='common.js,transport.js,index.js'}
这样用的话在IIS7 +php iasp 下起作用. 而不能在CGI-FCGI 模式下起作用.
真不知道该 怎么办才好
我 很怀疑是 CGI-FCGI 模式 与 IASP 之间存在问题 . 但是试了很久找不出原因..
希望有高手指点一下. 有什么办法可以解决
会不是是PHP.INI 的问题 .....
[ 本帖最后由 mjunhong 于 2012-5-2 11:00 编辑 ] |
|