For help, the php website was transplanted from the windows platform to the Linux platform, and the navigation error php + mysql website was displayed. it was transplanted from the original windows platform to the centos server platform, there are no other problems, that is, the home page navigation cannot be seen, and it does not work if clicked.
Original homepage code:
Hospital situation overview
-
Introduction
The main page code generated after transplantation:
-
" >
-
" >
Home page source code:
Session_start ();
Error_reporting (E_ALL ^ E_NOTICE );
Header ('content-Type: text/html; charset = utf-8 ');
Define ('thisadmini ', true );
$ DirName = dirname (_ FILE __);
$ ShlConfig = $ dirName. '/config/dt-config.php ';
If (! Is_file ($ shlConfig) | filesize ($ shlConfig) = 0 | filesize ($ shlConfig) = 3)
Exit ('shlcms has not been installed, please go to the installation directory ');
Else
Require ($ shlConfig );
Require (ABSPATH. '/loader/html. php ');
Function_exists ('date _ default_timezone_set ') & @ date_default_timezone_set ('etc/GMT-'. TIMEZONENAME );
Require_once (ABSPATH. '/inc/class. database. php ');
Require_once (ABSPATH. '/inc/function. php ');
$ _ REQUEST = cleanArrayForMysql ($ _ REQUEST );
$ _ GET = cleanArrayForMysql ($ _ GET );
$ _ POST = cleanArrayForMysql ($ _ POST );
$ Request =$ _ REQUEST;
$ Menu_arr = array ();
// Write route statement
$ PfileName = $ request ['F'];
If (! Empty ($ pfileName) & $ pfileName! = 'Search ')
$ Request ['P'] = getIdByMenuName ($ pfileName );
Elseif ($ pfileName = 'search ')
$ Request ['M'] = 'search ';
$ Params ['id'] = $ request ['P'] = isset ($ request ['P'])? Intval ($ request ['P']): 0;
$ Params ['CID'] = $ request ['c'] = isset ($ request ['c'])? Intval ($ request ['c']): 0;
$ Params ['args'] = $ request ['R'] = isset ($ request ['R'])? Intval ($ request ['R']): 0;
$ Params ['I'] = $ request ['I'] = isset ($ request ['I'])? Intval ($ request ['I']): 0;
$ Request ['comment'] = isset ($ request ['comment'])? Intval ($ request ['comment']): 0;
$ Request ['mdtp '] = isset ($ request ['mdtp'])? Intval ($ request ['mdtp ']): 0;
$ Menu_arr = get_model_type ($ params ['id']);
$ Request ['M'] =! Isset ($ request ['M'])? '': $ Request ['M'];
$ Params ['model'] = empty ($ request ['M'])? $ Menu_arr ['type']: $ request ['M'];
$ Request ['A'] =! Isset ($ request ['A'])? '': $ Request ['A'];
$ Params ['action'] = empty ($ request ['A'])? 'Index': $ request ['A'];
$ Params ['related _ common'] = empty ($ menu_arr ['related _ common'])? $ Params ['model']: $ menu_arr ['related _ common'];
If ($ params ['model']! = 'User' | $ params ['model']! = 'Index ')
{
$ Model_arr = array ('article', 'guestbook', 'jobs', 'order', 'webmap', 'poll ', 'Download ');
If (intval ($ _ SESSION [TB_PREFIX. 'user _ roleid']) {
URLREWRITE? Redirect ('/login.html'): redirect ('./? M = user & a = login & url = '. urlencode ($ _ SERVER ['request _ URI']); exit ();
}
}
$ LoadFile = array (
0 => '/inc/common. php ',
1 => '/inc/class. pager. php ',
2 => '/inc/class. treemenu. php ',
3 => '/content/common. php ',
4 => '/inc/class. seo. php ',
5 => '/config/dt-global.php ',
6 => '/content/index/common_call_label.php ',
7 => '/content/index/old_call_label.php'
);
Foreach ($ loadFile as $ k => $ v ){
Require_once (ABSPATH. $ v );
}
Unset ($ loadFile );
$ Controller = ABSPATH. '/content/'. $ params ['model']. '/index. php ';
If (is_file ($ controller ))
{
Require_once ($ controller );
Require_once (ABSPATH. '/content/comment/index. php ');
// Execute Action
Empty ($ params ['action'])? Index () :( function_exists ($ params ['action'])? $ Params ['action'] (): exit ("This action does not exist #". removeXSS ($ params ['action']). "or the column type has been modified "));
}
$ Part_path = ABSPATH. '/skins/'. STYLENAME .'/';
$ Part_common_path = ABSPATH. '/skins/'. STYLENAME. '/common /';
$ LoadSkinIndex = $ part_path. 'index. php ';
$ LoadSkinCommon = $ part_path. 'common. php ';
$ LoadSkinOtherCommon = $ part_common_path. $ params ['related _ common'];
Switch ($ params ['related _ common'])
{
Case 'index ':
If (is_file ($ loadSkinIndex) require_once ($ loadSkinIndex );
Break;
Default:
If (is_file ($ loadSkinOtherCommon ))
Require_once ($ loadSkinOtherCommon );
Elseif (is_file ($ loadSkinCommon ))
Require_once ($ loadSkinCommon );
Else
Exit ('
Pager error!');
Break;
}
Function sys_layout_part ($ style = '')
{
Global $ request, $ params, $ tag, $ path, $ data;
If (! Empty ($ style) $ style = '_'. $ style;
$ Part_path = ABSPATH. '/skins /'. STYLENAME. '/parts /'. $ params ['model']. '_'. $ params ['action']. $ style. '. php ';
$ Content_part_path = ABSPATH. '/content/'. $ params ['model']. '/parts _'. $ params ['action']. '. php ';
If (is_file ($ part_path ))
Require_once ($ part_path );
Elseif (is_file ($ content_part_path ))
Require_once ($ content_part_path );
Else
Echo'
';
IsComments ();
}
Function get_model_type ($ id)
{
Global $ db;
If ($ id = 0)
Return array ('type' => 'index', 'level' => 0 );
Else
Return $ db-> get_row ("SELECT * FROM". TB_PREFIX. "menu WHERE id = $ id", ARRAY_A );
}
// New 2011.01.08
Function getIdByMenuName ($ file)
{
Global $ db;
$ SQL = "SELECT id FROM". TB_PREFIX. "menu WHERE menuName = '$ file '";
Return $ db-> get_var ($ SQL );
}
Unset ($ request );
Unset ($ params );
Unset ($ tag );
Unset ($ path );
Unset ($ data );
?>
Reply to discussion (solution)
Which code can I post later?
Original environment
Short_open_tag = On
New environment
Short_open_tag = Off
Short tags are not supported, so
" >
The short Mark php code in is not executed
Thank you, moderator. master is master!