1

C# winforms アプリケーションを使用して、one.com Web ホストに接続したいと考えています。サポートは外部接続は許可されていないと言いましたが、ウェブホストのデータベーステーブルをどのように読み取るのですか? Web サイトで PHP を使用すれば機能すると言われましたが、実際に機能します。しかし、プログラムからそのコードにアクセスして値を返すようにするにはどうすればよいでしょうか?

どんな助けでも大歓迎です。前もって感謝します。

PS。どこかが不明な場合、またはさらに情報が必要な場合は、何が必要かを説明してください。

4

1 に答える 1

3

Your webhost has probably restricted the access to your database so that only a specific host can connect to it, namely the one hosting your PHP based website. This is a common practice.

If this is the case, you cannot connect from any other host - and thus, your C# winforms app won't be able to connect either.

So a direct connection from your C# app to your database isn't an option, but you might implement a REST interface with PHP that serves the data you need to the outside world. This could then be accessed by the clients using your C# app. This is the only solution I can think of.

于 2013-08-29T10:05:14.973 に答える