2017-07-18 23 views
0

こんにちは、データベースに接続しようとしましたが、これをやりません。laragonでプログラムを実行し、このエラーを表示します。 データベース接続は、mysqlを使用したadodbで行います。 ありがとうございます。phpのadodbとの接続でエラーが発生しました

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; ADODB_Cache_File has a deprecated constructor in C:\laragon\www\FacturaElectronicaAlumgo\sistema\adodb5\adodb.inc.php on line 233 
 

 
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; ADOConnection has a deprecated constructor in C:\laragon\www\FacturaElectronicaAlumgo\sistema\adodb5\adodb.inc.php on line 327 
 

 
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; ADORecordSet has a deprecated constructor in C:\laragon\www\FacturaElectronicaAlumgo\sistema\adodb5\adodb.inc.php on line 2854 
 

 
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; ADORecordSet_array has a deprecated constructor in C:\laragon\www\FacturaElectronicaAlumgo\sistema\adodb5\adodb.inc.php on line 3872 
 

 
Fatal error: Uncaught Error: Call to undefined function mysql_pconnect() in C:\laragon\www\FacturaElectronicaAlumgo\sistema\adodb5\drivers\adodb-mysql.inc.php:383 Stack trace: #0 C:\laragon\www\FacturaElectronicaAlumgo\sistema\adodb5\adodb.inc.php(588): ADODB_mysql->_pconnect('localhost', 'root', 'black44265769', 'cal24412_dte') #1 C:\laragon\www\FacturaElectronicaAlumgo\sistema\conexion.php(3): ADOConnection->PConnect('localhost', 'root', 'black44265769', 'cal24412_dte') #2 C:\laragon\www\FacturaElectronicaAlumgo\sistema\validar.php(8): include('C:\\laragon\\www\\...') #3 {main} thrown in C:\laragon\www\FacturaElectronicaAlumgo\sistema\adodb5\drivers\adodb-mysql.inc.php on line 383

答えて

1

何PHPバージョン?私は '非難された'メッセージと最後の '致命的な'エラーのために、おそらく7.xをここに仮定しています。

それは

  1. は廃止... 2つの一部の問題です:

    PHPが代わりに同じ名前を持つのコンストラクタとして__construct() (2先頭のアンダースコア)を使用するように変更を行っていますクラスそのもの。詳細は、PHP 4 style constructorsセクション(ページの最初のセクション)を参照してください。例えば

    ADOConnection has a deprecated constructor...へのファイルでコンストラクタはおそらく次のようになります。

    ADOConnection(...); // constructors with or without parameters 
    

    ...しかし、それらのすべてを置き換えることができます。あなたはその変更を行うことができます

    __construct(...); 
    

    非難されたメッセージを解決するためにローカルに。

  2. 致命的なエラー:

    PHP 7.xのでは、mysql_ *ベースの機能が削除さ です。 this API infoを参照してください。 私はでの作業に慣れていないです:

+0

おかげで答えを、yは同じAPI情報あなたの答えは、私は実際に非常に感謝PDをたくさん助け、今私はあなたと一緒に致命的なエラーを解決しようとすると、dreprecateエラーを解決しますPHPと私は多くのエラーを持っていたので、私にとっては少し難しいシステムでした。 –

+0

これを解決するには、mysql_ *を使用することができません。 mysqli_ *(後続の** i **)またはPDOの処理のいずれかを使用する必要があります。 –

+0

私の問題を解決できました ありがとうございました –

関連する問題