作業綜合練習 初始化工作

2022-08-29 22:12:25 字數 811 閱讀 2667

燕十八 公益php培訓

學習社群:www.zixue.it

<?php

//初始化頁面

//載入config.int.php 和 mysql.func.php

//設定位址轉義

//設定$conn 變數 連線資料庫 設定用那個資料庫,設定charset

define('root','d:/www/');

require(root . 'config.int.php');

require(root . 'mysql.func.php');

//載入必要預定義頁面

if (defined('debug'))

else

if (!get_magic_quotes_gpc

())

array_walk_recursive($_get,'_addslashes');

array_walk_recursive($_post,'_addslashes');

array_walk_recursive($_cookie,'_addslashes');

}$conn = mysql_connect($_cfg['host'],$_cfg['user'],$_cfg['pw']);

if (!$conn

)$sql = 'use ' . $_cfg['db'];

mysql_query($sql,$conn

);$sql = 'set names ' . $_cfg['charset'];

mysql_query($sql,$conn

);?>

oracle系統初始化工作

3.1 oracle系統初始化 用root使用者登入,然後執行 oracle home root.sh進行oracle的系統初始化工作,通常一路按回車用預設值即可。3.2 安裝網路 3.3 修改dbstart 用任意的文字編輯器開啟 oracle home bin dbstart,將 oracle ...

Struts實現初始化工作

struts1 建立servlet,在init方法中完成要做的工作,在web.xml中配置load on startup即可。struts2 簡歷乙個filter繼承filterdispatcher,在init方法中完成要做的工作,相應的在web.xml中配置該filter即可。比較通用的做法是現實...

linux 安裝 mysql的初始化工作

linux下安裝了mysql後,尤其是yum安裝方式,需要一些初始化工作。執行mysql install db這個程式,一般路徑是 usr bin mysql install db,用於初始化mysql的資料庫,生成元資料。不執行的話,會出現 can t open and lock privileg...