私はこのコード宣言エラー
include('database.php');
function get_something() {
database instructions
}
function get_another(){
database instructions
}
を書いて、私は再宣言エラーを取得し、この
function get_something() {
include('database.php');
database instructions
}
function get_another(){
include('database.php');
database instructions
}
で修正してみてください。
どうすればこの問題を解決できますか?
おかげ
'include_once'を使うと、インクルードされたファイルの関数はグローバルにAFAIKとして宣言されます。 –
...関数と 'define'itions :-) –