學校整合模組-班級網頁

edited 十月 2013 in 內容管理系統
我根據您貴站
學校整合模組
http://twpug.net/modules/wfdownloads/viewcat.php?cid=31
的範例

我改了
1. 將 school 整個目錄拷貝至Apache/www/school/
2. 改變 school/data 目錄下權限(777)(chmod -R 777 data)
3.$db_hostname = 'localhost'; //*MySQL hostname
$use_db = 'school'; //*主要資料庫 我在phpmyadmin 新增了 school 資料表
$db_username = 'root'; //*MySQL username
$db_passwd = 'xxx'; //*MySQL username 的密碼
$self_url = 'http://localhost/www/school/'; //*設定本程式放置 URL
$self_place = 'c:/appserv/www/school/'; //*設定本程式實體路徑(Windows 以 appserv 套件)
4.之後執行 http://localhost/school/
出現
Fatal error: Call to a member function on a non-object in c:\appserv\www\school\index.php on line 5

請問各位先進,我是那裏錯了,救命哦
我的網址是http://163.24.136.10/school/

原始討論: http://twpug.net/x/modules/newbb/viewtopic.php?topic_id=1015

評論

  • edited 十一月 2005
    我將文章中的資料庫密碼改成 xxx ,你不該將 root 的密碼到處流傳...

    問題也許是出在環境上,細節部份就看看其他朋友有沒有經驗了。
  • edited 十一月 2005
    Fatal error: Call to a member function on a non-object in c:\appserv\www\school\index.php on line 5

    這表示有個模組php不認得
    可以post上來index.php的第五行是什麼嗎?
    或者直接安裝缺少的模組也應該是可以
  • edited 十一月 2005
    我也覺得奇怪,前面第5行............到底哪裏出錯啊....

    謝謝.... 下為 school / 底下的index.php 的原始碼

    <?php
    require_once("adodb/adodb.inc.php");
    require_once("config.inc.php");
    $res_setup = $conn->Execute("select * from school");
    $row_setup = $res_setup->FetchRow();
    ?>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//big5">
    <title>國中小整合界面</title>
    <meta http-equiv="Content-Type" content="text/html; charset=big5">
    <link href="link.css" rel="stylesheet" type="text/css">
    <body bgcolor="#FFFFFF" leftmargin="5" topmargin="5" rightmargin="5" bottommargin="5">
    <div align="center"><img src="images/title.gif" border="0" ></div>
    <div align="center"><a href="<?php echo $row_setup["homepage"] ?>">回<?php echo $row_setup["name"] ?></a>|<a href="manage.php">登入管理</a></div>

    <table width="78%" height="421" border="1" align="center" cellpadding="2" cellspacing="0" bordercolorlight="#808080" bordercolordark="#ffffff">
    <tr bgcolor="#99CCCC">
    <td height="22"> <div align="center">程式模組</div></td>
    <td height="22"><div align="center">程式連結</div></td>
    </tr>
    <tr bgcolor="#f5f5f5">
    <td width="36%" height="22" align="center" valign="top">
    <div align="center">
    <p align="left">01<a href="basic/index_intro.php">教職員工簡介</a> </div></td>
    <td width="64%" align="center" valign="top"><div align="left">basic/index_intro.php
    </div></td>
    </tr>
    <tr bgcolor="#f5f5f5">
    <td height="23" align="center" valign="top"><div align="left">01網頁登錄(<a href="basic/reg_teh.php">教師</a>-<a href="basic/reg_class.php">班級-</a><a href="basic/reg_std.php">學生</a><a href="basic/teh_reg.php">)</a></div></td>
    <td width="64%" align="center" valign="top"><div align="left">basic/index_reg.php</div></td>
    </tr>
    <tr bgcolor="#f5f5f5">
    <td height="22" align="center" valign="top"><div align="left">02<a href="pub/index.php">最新公告</a></div></td>
    <td width="64%" align="center" valign="top"><div align="left">pub/index.php?prgid=***(***是可改變)</div></td>
    </tr>
    <tr bgcolor="#f5f5f5">
    <td height="22" align="center" valign="top"><div align="left">03<a href="album/index.php">學校活動相簿</a></div></td>
    <td width="64%" align="center" valign="top"><div align="left">album/index.php</div></td>
    </tr>
    <tr bgcolor="#f5f5f5">
    <td height="22" align="center" valign="top"><div align="left">03<a href="album/index_w.php">學生作品相簿</a></div></td>
    <td width="64%" align="center" valign="top"><div align="left">album/index_w.php</div></td>
    </tr>
    <tr bgcolor="#f5f5f5">
    <td height="22" align="center" valign="top"><div align="left">
    04<font size="2"><a href="honor/index.php">榮譽榜</a></font></div></td>
    <td width="64%" align="center" valign="top"><div align="left">honor/index.php </div></td>
    </tr>
    <tr bgcolor="#f5f5f5">
    <td height="22" align="center" valign="top"><div align="left">05<font size="2"><a href="netlink/index.php">網網相連</a></font> </div></td>
    <td align="center" valign="top"><div align="left">netlink/index.php</div></td>
    </tr>
    <tr bgcolor="#f5f5f5">
    <td height="22" align="center" valign="top"><div align="left">06<a href="files/index.php"><font size="2">檔案管理</font></a></div></td>
    <td width="64%" align="center" valign="top"><div align="left">files/index.php?prgid=***(***是可改變)</div></td>
    </tr>
    <tr bgcolor="#f5f5f5">
    <td height="22" align="center" valign="top"><div align="left">
    07<a href="lunch/index.php">營養午餐</a></div></td>
    <td width="64%" align="center" valign="top"><div align="left">lunch/index.php<br>
    </div></td>
    </tr>
    <tr bgcolor="#f5f5f5">
    <td height="22" align="center" valign="top"><div align="left">08<a href="paper/index.php">段考試題</a> </div></td>
    <td width="64%" align="center" valign="top"><div align="left">paper/index.php</div></td>
    </tr>
    <tr bgcolor="#f5f5f5">
    <td height="22" align="center" valign="top"><div align="left">09<a href="repair/index.php">維修通報</a></div></td>
    <td align="center" valign="top"><div align="left">repair/index.php</div></td>
    </tr>
    <tr bgcolor="#f5f5f5">
    <td height="22" align="center" valign="top"><div align="left">10<a href="order/index.php">教室預約</a></div></td>
    <td align="center" valign="top"><div align="left">order/index.php</div></td>
    </tr>
    <tr bgcolor="#f5f5f5">
    <td height="22" align="center" valign="top"><div align="left">11<a href="schdule/index.php">行事曆</a></div></td>
    <td align="center" valign="top"><div align="left">schdule/index.php</div></td>
    </tr>
    <tr bgcolor="#f5f5f5">
    <td height="22" align="center" valign="top"><div align="left">12<a href="vote/index.php">網路投票</a></div></td>
    <td align="center" valign="top"><div align="left">vote/index.php</div></td>
    </tr>
    <tr bgcolor="#f5f5f5">
    <td height="22" align="center" valign="top"><div align="left">13<a href="msg/index.php">留言版</a></div></td>
    <td align="center" valign="top"><div align="left">msg/index.php?prgid=***(***是可改變)</div></td>
    </tr>
    <tr bgcolor="#f5f5f5">
    <td height="22" align="center" valign="top"><div align="left">14<a href="discuss/index.php">討論區</a></div></td>
    <td align="center" valign="top"><div align="left">discuss/index.php?prgid=***(***是可改變)</div></td>
    </tr>
    <tr bgcolor="#f5f5f5">
    <td height="22" align="center" valign="top"><div align="left">15<a href="counter/manage.php">計數器</a></div></td>
    <td align="center" valign="top"><div align="left">counter/index.php?prgid=***(***是可改變)</div></td>
    </tr>
    <tr bgcolor="#f5f5f5">
    <td height="22" align="center" valign="top"><div align="left">16<a href="vedio/index.php">影音媒體</a></div></td>
    <td align="center" valign="top"><div align="left">vedio/index.php?prgid=***(***是可改變)</div></td>
    </tr>
    <tr bgcolor="#f5f5f5">
    <td height="22" align="center" valign="top"><div align="left">17<a href="board/manage.php">電子看板</a></div></td>
    <td align="center" valign="top"><div align="left">board/index.php?prgid=***
  • edited 十一月 2005
    剛剛說錯了

    Fatal error: Call to a member function on a non-object in c:\appserv\www\school\index.php on line 5

    是說這一行呼叫的function php找不到

    第五行是
    $row_setup = $res_setup->FetchRow();

    實際抓檔案下來看的結果,只能說抱歉了....
    此位作者的寫法,我必須花很多時間研究才能看出一個大概
    實在沒那個時間去深入了解阿

    只能看看其他的大大們有沒有研究過了 ├140┤
  • edited 十一月 2005
    不管如何,還是謝謝了.......
  • edited 十一月 2005
    覺得是這個設定的路徑有錯:
    $self_url = 'http://localhost/www/school/'; //*設定本程式放置 URL
    是不是改成:
    $self_url = 'http://localhost/school/'; //*設定本程式放置 URL
    才會正常呀!
    試試看!
Sign In or Register to comment.