PHP上級者が集まるス ..
158:名無しさん@そうだ選挙に行こう
10/07/10 11:40:57 .net
phpのglobal変数について質問があります。
global変数はクラス内に定義する事は出来ないのがphpの仕様なのでしょうか?
//文法エラーが発生
class TestClass
{
global $test1;
static public function TestFunction( )
{
echo "test";
}
}
//OK
class TestClass
{
static public function TestFunction( )
{
global $test1;
echo "test";
}
}
次ページ続きを表示1を表示最新レス表示スレッドの検索類似スレ一覧話題のニュースおまかせリスト▼オプションを表示暇つぶし2ch
559日前に更新/133 KB
担当:undef