亚洲av成人无遮挡网站在线观看,少妇性bbb搡bbb爽爽爽,亚洲av日韩精品久久久久久,兔费看少妇性l交大片免费,无码少妇一区二区三区

  免費注冊 查看新帖 |

Chinaunix

  平臺 論壇 博客 文庫
最近訪問板塊 發(fā)新帖
查看: 25908 | 回復: 5
打印 上一主題 下一主題

ASP轉PHP手記 [復制鏈接]

論壇徽章:
0
跳轉到指定樓層
1 [收藏(0)] [報告]
發(fā)表于 2008-11-17 21:02 |只看該作者 |倒序瀏覽
打算將動易網站管理系統(tǒng)移植到PHP環(huán)境中,尋尋覓覓了很多PHP內容管理網站,發(fā)現(xiàn)網上有動易轉PHPCMS的代碼,所以就拿定注意用PHPCMS的在google上找到一轉換程序,動手做來還成功了,現(xiàn)將此次轉換的經驗與教訓總結如下:
   1.在http://www.otand.com/html/php/cms/20080605/2852.html下載完美動易2006 Sp6  SiteWeaver CMS6.5 Access MSSQL轉 PHPCMS 2007 SP6程序解壓縮備用,請不要下載PHPCMS官網的轉換程序,因其有很多錯誤,還是完美的好。
   2.先在windows下調試,求方便直接下載的PHPCMS集成包, http://soft.phpcms.cn/2008/0116/soft_138.html,一鍵安裝后直接可以用。
   (后在linux下證實,直接將MYSQL數(shù)據(jù)庫復制過去是可行的)
將完美轉換程序解壓后,找到里面的config.php,因我以前用的是ACCESS數(shù)據(jù)庫,所以這里將ACCESS以外的MSSQL全部注釋掉,例如:
// 訪問 訪問數(shù)據(jù)庫類型   數(shù)據(jù)庫類型支持Access,MsSQL   請選擇數(shù)據(jù)庫類型并認真填寫下列信息
$_CONFIG['db_type'] = 'Access';
//$_CONFIG['db_type'] = 'MsSQL';
// 訪問 MsSQL  的主機名,如果是本機為localhost
//$_CONFIG['db_sql_host'] = 'localhost';
// 訪問 MsSQL  的數(shù)據(jù)庫名
//$_CONFIG['db_sql_name'] = 'powereasy';
// 訪問 MsSQL  的用戶名
//$_CONFIG['db_sql_user'] = 'powereasy';
// 訪問 MsSQL  的密碼
//$_CONFIG['db_sql_pass'] = 'powereasy5598';
//是否使用持久連接
//$_CONFIG['db_pconnect'] = '1';

然后將ACCESS數(shù)據(jù)庫放在D盤根目錄下,例如:
// 訪問 access 數(shù)據(jù)庫文件名,絕對地址: D:\改成D:/
$_CONFIG['access_mdb'] = 'd:/danweishujuku.mdb';
//紅字地方是自己數(shù)據(jù)庫名稱
// 訪問 access 數(shù)據(jù)庫文件的用戶名,一般默認為空
$_CONFIG['access_uid'] = '';
// 訪問 access 數(shù)據(jù)庫文件的密碼,一般默認為空
$_CONFIG['access_pwd'] = '';
// PE 數(shù)據(jù)表前綴 一般不需要修改
$_CONFIG['access_tablepre'] = 'PE_';
// 每次需要轉換的數(shù)據(jù)量,如果您的服務器比較慢,請將這個值調小
$CONFIG['rpp'] = '1000';
?>

僅僅更改這兩項。

然后將整個解壓后的包放在網站根目錄下,我這里是phproot所以直接放PHProot下即可。

比較笨的我,剛開始是這么做的,人家readme上是這么寫的“將本程序解壓到PHPCMS根目錄”我呢,沒有把一整包放在根目錄下,而是把一堆文件拷到了PHPROOT下,這樣肯定會覆蓋原有的INDEX.PHP啊,我又把原index.php做了個備份,然后運行之,然后會有錯誤提示若干:
Warning: include_once(../include/common.inc.php) [function.include-once]: failed to open stream: No such file or directory in D:\PC_webserver\phproot\index.php on line 14

Warning: include_once() [function.include]: Failed opening '../include/common.inc.php' for inclusion (include_path='.;C:\php5\pear') in D:\PC_webserver\phproot\index.php on line 14

Warning: include_once(PHPCMS_ROOT/config.inc.php) [function.include-once]: failed to open stream: No such file or directory in D:\PC_webserver\phproot\index.php on line 15

Warning: include_once() [function.include]: Failed opening 'PHPCMS_ROOT/config.inc.php' for inclusion (include_path='.;C:\php5\pear') in D:\PC_webserver\phproot\index.php on line 15

Warning: include_once(PHPCMS_ROOT/include/cache.func.php) [function.include-once]: failed to open stream: No such file or directory in D:\PC_webserver\phproot\index.php on line 16

Warning: include_once() [function.include]: Failed opening 'PHPCMS_ROOT/include/cache.func.php' for inclusion (include_path='.;C:\php5\pear') in D:\PC_webserver\phproot\index.php on line 16

Warning: include_once(PHPCMS_ROOT/admin/include/global.func.php) [function.include-once]: failed to open stream: No such file or directory in D:\PC_webserver\phproot\index.php on line 17

Warning: include_once() [function.include]: Failed opening 'PHPCMS_ROOT/admin/include/global.func.php' for inclusion (include_path='.;C:\php5\pear') in D:\PC_webserver\phproot\index.php on line 17
Access Denied

這些東西說明找不到某個文件,看了轉換程序的index.php原來在這里

第14行的include_once(PHPCMS."/include/common.inc.php");

而PHPCMS.的定義是“..”這樣的話直接就出了phproot這個目錄了,所以會提示找不到文件

有兩個方法可以解決:
  1:將index.php文件的include_once(PHPCMS."/include/common.inc.php");的(PHPCMS."/include/common.inc.php");改為include_once("include/common.inc.php");
然后再運行http://127.0.0.1/index.php

  2:解壓轉換程序后更改config.php文件,然后將整個包拷到網站根目錄下例如:
    http://127.0.0.1/完美動易2006 Sp6 SW6.5 Access MSSQL轉 PHPCMS 2007 SP6 /index.php

第二種是最簡單的,定義好自己數(shù)據(jù)庫后運行下即可,省去了尋找問題的時間。



轉換完后登陸后臺,此時切記切記要更新全部緩存否則當管理頻道--重建目錄時會提示如下錯誤:
Warning: require(D:/PC_webserver/phproot/languages//phpcms.lang.php) [function.require]: failed to open stream: No such file or directory in D:\PC_webserver\phproot\include\common.inc.php on line 28

Fatal error: require() [function.require]: Failed opening required 'D:/PC_webserver/phproot/languages//phpcms.lang.php' (include_path='.;C:\php5\pear') in D:\PC_webserver\phproot\include\common.inc.php on line 28

非常要命的錯誤。。。!出現(xiàn)后刷新頁面整個后臺都無法登陸了。。
刷新后的錯誤提示:

Warning: require(D:/PC_webserver/phproot/languages//phpcms.lang.php) [function.require]: failed to open stream: No such file or directory in D:\PC_webserver\phproot\include\common.inc.php on line 28

Fatal error: require() [function.require]: Failed opening required 'D:/PC_webserver/phproot/languages//phpcms.lang.php' (include_path='.;C:\php5\pear') in D:\PC_webserver\phproot\include\common.inc.php on line 28
此時只有重新安裝PHPCMS了!

        
再強調一下:轉換完后登陸后臺首先是更新緩存。。。!                     jinscan       2008.11.17

                                                                                                             jinscan   2008.11.19翻看自己帖子時發(fā)現(xiàn)有一小小錯誤,稍作更改,不好意思。

[ 本帖最后由 jinscan 于 2008-11-19 08:10 編輯 ]

評分

參與人數(shù) 1可用積分 +1 收起 理由
Digico + 1 我很贊同

查看全部評分

論壇徽章:
52
碼神
日期:2017-03-28 10:27:10綜合交流區(qū)版塊每日發(fā)帖之星
日期:2015-10-11 06:20:00綜合交流區(qū)版塊每日發(fā)帖之星
日期:2015-09-28 06:20:00綜合交流區(qū)版塊每日發(fā)帖之星
日期:2015-09-22 06:20:00每日論壇發(fā)貼之星
日期:2015-09-12 06:20:00綜合交流區(qū)版塊每日發(fā)帖之星
日期:2015-09-12 06:20:00綜合交流區(qū)版塊每日發(fā)帖之星
日期:2015-09-08 06:20:00綜合交流區(qū)版塊每日發(fā)帖之星
日期:2015-09-05 06:20:00綜合交流區(qū)版塊每日發(fā)帖之星
日期:2015-09-04 06:20:002015亞冠之德黑蘭石油
日期:2015-09-01 10:41:53每日論壇發(fā)貼之星
日期:2015-10-11 06:20:00綜合交流區(qū)版塊每日發(fā)帖之星
日期:2015-10-12 06:20:00
2 [報告]
發(fā)表于 2008-11-17 23:24 |只看該作者

回復 #1 jinscan 的帖子

收藏了,感謝。。。

論壇徽章:
0
3 [報告]
發(fā)表于 2008-11-21 15:08 |只看該作者
先留個腳印。

論壇徽章:
0
4 [報告]
發(fā)表于 2008-11-21 22:47 |只看該作者
留個爪子

論壇徽章:
0
5 [報告]
發(fā)表于 2008-11-24 14:51 |只看該作者
記錄,作個標記先

論壇徽章:
0
6 [報告]
發(fā)表于 2011-08-30 13:28 |只看該作者
感謝lZ的帖子,使我得到了啟發(fā),解決了類似路徑問題。謝謝
您需要登錄后才可以回帖 登錄 | 注冊

本版積分規(guī)則 發(fā)表回復

  

北京盛拓優(yōu)訊信息技術有限公司. 版權所有 京ICP備16024965號-6 北京市公安局海淀分局網監(jiān)中心備案編號:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年舉報專區(qū)
中國互聯(lián)網協(xié)會會員  聯(lián)系我們:huangweiwei@itpub.net
感謝所有關心和支持過ChinaUnix的朋友們 轉載本站內容請注明原作者名及出處

清除 Cookies - ChinaUnix - Archiver - WAP - TOP