全國最多中醫師線上諮詢網站-台灣中醫網
發文 回覆 瀏覽次數:2024
推到 Plurk!
推到 Facebook!

跨平台問題-該如何用delphi做出顯示遠端資料庫資料的網頁??

尚未結案
firefall
一般會員


發表:22
回覆:36
積分:11
註冊:2002-05-14

發送簡訊給我
#1 引用回覆 回覆 發表時間:2004-03-25 02:02:57 IP:61.229.xxx.xxx 未訂閱
各位大大: 小弟的環境如下: Linux RedHat 9.0 apache(redhat9.0 原始光碟內附) 當網路伺服器(內置網頁,資料庫),內部區域網路為win2000 server interbase 6,開發工具為 delphi 6 ,網頁型式為 htm、php 4.2。 該如何做出使用者在linux上點選網頁,即可show 出 win2000 資料庫的查詢資料,小弟用kylix的websnap卻無法連接win2000上的interbase,而在win2000上用delphi的websnap 可顯示出網頁資料但在linux上卻無法執行,小弟又用dreamweaver 用asp可顯示出資料但在linux上卻無法執行,而php雖可執行,但僅限於mysql,小弟苦惱好久,已有好幾天沒睡好,拜託各位大大救救小弟,萬分感謝。
conundrum
尊榮會員


發表:893
回覆:1272
積分:643
註冊:2004-01-06

發送簡訊給我
#2 引用回覆 回覆 發表時間:2004-03-25 19:35:50 IP:61.221.xxx.xxx 未訂閱
php雖可執行,但僅限於mysql 再去看看 PHP.ini的設定檔內容下 PHP透過ODBC就可以了 不是只有mysql mysql可以使用無odbc方式去讀
firefall
一般會員


發表:22
回覆:36
積分:11
註冊:2002-05-14

發送簡訊給我
#3 引用回覆 回覆 發表時間:2004-03-25 23:59:07 IP:61.229.xxx.xxx 未訂閱
引言: php雖可執行,但僅限於mysql 再去看看 PHP.ini的設定檔內容下 PHP透過ODBC就可以了 不是只有mysql mysql可以使用無odbc方式去讀
感謝這位大大回答,小弟是希望能在win2000,用delphi、dreamweaver可快速開發動態網頁的工具開發網頁,再將網頁上傳至linux上供使用者使用,而上面指得是用dreamweaver下用php網頁格式僅能接受mysql,若要用php 連接 interbase 得手動自行查閱php 再自寫php 動態網頁,那將是一大工程(因小弟不熟php,希望能有好方法、工具快速開發網頁),不知大大是否有好的建議。謝謝!!
conundrum
尊榮會員


發表:893
回覆:1272
積分:643
註冊:2004-01-06

發送簡訊給我
#4 引用回覆 回覆 發表時間:2004-03-26 01:02:46 IP:61.64.xxx.xxx 未訂閱
個人想法 我無法幫你解決問題 只能 亂 一下 討論問題 不論你使用 後端編輯工具是delphi還是VB 或BCB這無關 你說的 動態網頁 多年前就流行類似軟體 使用delphi後端 產生的檔案 要簡易 跨平台 不是HTML就是PHP或JSP 要上傳 那是FTP的是 KTOP有範例 自己產生網頁的技巧 可以看看 KTOP離線包源碼 若要用php 連接 interbase 得手動自行查閱php 再自寫php 動態網頁 我個人覺得 要快速跨平台適用各OS除了PHP可能就是jsp xml 雖然Linux上也有可以跑ASP但是問題多多 所以 一魚多ㄘ 有些事 可是要善加考慮的 因為你要的 是讓管理者與使用者都很快速的產生網頁 這種作法未何無法 普遍在市場 最大原因 網頁是生動的 非類似套表產生 就能令人長期滿足 可以快速 產生網頁 確因 網頁型態太多 造成 都一樣的問題 去找這zeosdbo免費vcl 功能好又好用 mysql mssql等sql都有支援 自己的問題 就只有自己解決了 php http://delphi.ktop.com.tw/topic.php?TOPIC_ID=24170 【分享】用DHTML實現動態網頁 http://delphi.ktop.com.tw/topic.php?TOPIC_ID=37722 【轉貼】SN Chart Server-Web伺服器端的資料庫圖表動態顯示軟體 http://delphi.ktop.com.tw/topic.php?TOPIC_ID=41768 【Delphi】【轉貼】用ASP 或者Delphi生成 Flash 動畫 http://delphi.ktop.com.tw/topic.php?TOPIC_ID=28198 這一個 應該與你的相差不遠 【轉貼】ASP/PHP Web Application Builder http://delphi.ktop.com.tw/topic.php?TOPIC_ID=41335 要知道他是診摸做的 喝喝 那就得多多看 他的功能點 一一突破 問問各版主了
conundrum
尊榮會員


發表:893
回覆:1272
積分:643
註冊:2004-01-06

發送簡訊給我
#5 引用回覆 回覆 發表時間:2004-03-26 01:21:07 IP:61.64.xxx.xxx 未訂閱
http://www.faqts.com/knowledge_base/view.phtml/aid/18951/fid/679  
how to connect redhat linux php client to a remote interbase server
how to connect redhat linux php client to a remote interbase server
how to connect redhat linux php client to a remote interbase server
Sep 26th, 2002 12:48    Jeff Stern        i struggled for days to get my php (on a linuux redhat 7.3 box) to see
our interbase server (on a remote win/nt machine), and found no docs
or help in all the right places.. so i offer this as a help to anyone
else who is struggling to get it configured. it probably won't be
perfect for you, but hopefully it will get you in the ballpark close
enough to save you a little time..    as far as i could tell (though it wasn't explicitly stated anywhere),
there are two options for connecting php to an interbase database:     1) directly 
   for this, you need to re-compile php, since redhat does not provide
   the compile-flag that php needs    2) via ODBC 
   for this, you need to install the interbase client and easysoft
   odbc drivers.    i chose 2), because support for ODBC *is* compiled into the PHP
distributed in the Redhat rpms.    for either one, however, you need to have a copy of the interbase
client library.    how to get it? the way i handled this was by downloading a demo trial
from Interbase (see below) but i believe there are other ways, as well.    also, it's not specified anywhere what rpms you will need, and this
adds more time/confusion to the mix. these are the RPM's i have
installed (by the time you read this, it may be dated info):      Prerequisite RPM's:
  ------------------
  apache-1.3.23-14
  unixODBC-2.2.0-5
  php-4.1.2-7.3.4
  php-odbc-4.1.2-7.3.4    i got all of these from the redhat cd (or a download mirror).  the
IB65 demo will install at least 2 more rpm's..    now download the IB65 demo tar from borland. to do this, set your
browser to:      http://www.borland.com/products/downloads/download_interbase.html    click on "Trial download", log in (create account 1st if you need to),
and download 'IB65_eval_linux.gz'.    now run        tar -zxvf IB65_eval_linux.gz    and then cd to IB65_linux.    now, run ./setup, install interbase client only (choice 3), then the
easysoft/odbc rpms (choice 7). as the Install.txt says, add
/opt/interbase/bin to your path (in /etc/profile or ~/.profile or
.cshrc or wherever you want) and reboot or restart shell, etc.    make sure that your /etc/odbcinst.ini has a section for your drivers:      [INTERBASE]
  Description             = Easysoft Driver for Interbase
  Driver          = /usr/lib/libib6odbc.so
  Setup           = /usr/lib/libib6odbcS.so
  FileUsage               = 1
  DontDLClose             = 1    and that your /etc/odbc.ini has 1 section for each database you want
to connect to. the default from the installation looks like this:      [ib6]
  Driver              = INTERBASE
  Description             = interbase driver
  Database              = localhost:/opt/interbase/examples/employee.gdb
  User                    = sysdba
  Password                = masterkey
  With_Schema             = 0
  Dialect             = 3
  Charset         =
  Role            =
  Nowait          = 0    but in my case, i changed the Database, User, and Password fields to
match the remote server that i need to connect to. (also, we are using
interbase 6.0.. i don't know how you'll do if you're using 5.x or
earlier). also, if you are using a Windows IB server, then unless you
have an alias set, your URL will have to include the drivename,
too. for instance:      Database              = myserver.com:c:/path/to/database/file.gdb    ..this can be a little stickler sometimes..    also, you don't need the unixODBC gui (ODBCConfig or gODBCConfig),
since all it really does is edit the 2 .ini files mentioned above.    also, if you want logs of your ODBC connections for debugging, etc.,
then you can add these lines to your /etc/odbcinst.ini file:      [ODBC]
  Trace           = Yes
  Trace File      = /tmp/sql.log    (though be careful, because it can grow large, fast).    now, when you run isql from the command-line, it would look like this:      % isql ib6    or      % isql -v ib6    if you want to see verbose output because you are having problems
connecting.    that's it!    now, you can just do normal odbc commands in your php, such as       $connection = odbc_connect("ib6", "", "") or die(odbc_error_msg());    or other variant.. remember to use the same DSN syntax (don't specify
the database URL directly). also, you don't need to supply interbase 
user or password, since these are already included in the odbc.ini file 
you set up.    also, you might want to change the permissions and ownership of 
your /etc/odbc.ini file, since all your system users can currently read 
the db username, password and DB-URL. so, something like this will work:      $ chomod 640 /etc/odbc.ini
  $ chown root.apache /etc/odbc.ini    Problems:
========    1) if you get an error message (using the '-v' flag) like this:      [unixODBC][Driver Manager]Invalid string or buffer length
  [ISQL]ERROR: Could not SQLConnect    then you might be trying to use the isql command incorrectly. that is,
you might be trying to use the database URL:      % isql server:/path/to/dbfile.gdb    if that is the case, DONT. it's not meant to do it that way. i know:
if you do an 'isql --help' and capture the stderr output, it will show
you to connect to a DSN but it doesn't explain what a DSN
is. apparently a DSN is the section-name in the odbc.ini file.    2) if you get an error message like this:      [unixODBC][Driver Manager]Can't open lib '/usr/lib/libib6odbc.so' :
  libodbcinst.so: cannot open shared object file: No such file or 
directory
  [ISQL]ERROR: Could not SQLConnect    it might be because somehow your system got a symlink message up in
your libs directory. for instance, i had to go back and make one:      % cd /usr/lib
  % ln -sf libodbcinst.so.1.0.0 libodbcinst.so    ..your mileage may vary..    hope this was helpful
 
conundrum
尊榮會員


發表:893
回覆:1272
積分:643
註冊:2004-01-06

發送簡訊給我
#6 引用回覆 回覆 發表時間:2004-03-26 01:26:32 IP:61.64.xxx.xxx 未訂閱
http://delphi.ktop.com.tw/forum.asp?FORUM_ID=900 這一篇也看看把     
 PHP 能做什麼?
http://linux.tnc.edu.tw/techdoc/php/php_big5/intro-whatcando.html
PHP 最強大最顯著的特性之一,是它支援很大範圍的資料庫。
您會發現利用 PHP 編寫資料庫支援的網頁簡單得難以置信。目前,PHP 支援如下資料庫:     Adabas D    Ingres           Oracle (OCI7 and OCI8) 
dBase       InterBase        Ovrimos 
Empress     FrontBase        PostgreSQL 
FilePro     (read-only)      mSQL Solid 
Hyperwave   Direct MS-SQL    Sybase 
IBM DB2     MySQL            Velocis 
Informix    ODBC             Unix dbm     
我們同時還有一個 DBX 擴展庫使得您可以自由的使用該擴展庫支援的任何資料庫。另外,PHP 還支援 ODBC,即 Open Database Connection Standard(開放資料庫連接標準),因此您可以連接任何其它支援該世界標準的資料庫。 發表人 - conundrum 於 2004/03/26 01:33:22
firefall
一般會員


發表:22
回覆:36
積分:11
註冊:2002-05-14

發送簡訊給我
#7 引用回覆 回覆 發表時間:2004-03-27 03:16:14 IP:61.229.xxx.xxx 未訂閱
引言: http://delphi.ktop.com.tw/forum.asp?FORUM_ID=900 這一篇也看看把
 PHP 能做什麼?
http://linux.tnc.edu.tw/techdoc/php/php_big5/intro-whatcando.html
PHP 最強大最顯著的特性之一,是它支援很大範圍的資料庫。
您會發現利用 PHP 編寫資料庫支援的網頁簡單得難以置信。目前,PHP 支援如下資料庫:     Adabas D    Ingres           Oracle (OCI7 and OCI8) 
dBase       InterBase        Ovrimos 
Empress     FrontBase        PostgreSQL 
FilePro     (read-only)      mSQL Solid 
Hyperwave   Direct MS-SQL    Sybase 
IBM DB2     MySQL            Velocis 
Informix    ODBC             Unix dbm     
我們同時還有一個 DBX 擴展庫使得您可以自由的使用該擴展庫支援的任何資料庫。另外,PHP 還支援 ODBC,即 Open Database Connection Standard(開放資料庫連接標準),因此您可以連接任何其它支援該世界標準的資料庫。 發表人 - conundrum 於 2004/03/26 01:33:22
謝謝conundrum兄提供資料,小弟繼續努力研究
系統時間:2024-07-06 4:19:55
聯絡我們 | Delphi K.Top討論版
本站聲明
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。
2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。
3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇!