मेरे पास डेटाबेस में भुगतान रिकॉर्ड डालने का एक छोटा वर्ग है। नीचे दिया गया हैस्थिर फ़ंक्शन पर घातक त्रुटि क्यों दिखा रहा है
<?php
class pay{
public static function pay($user, $income, $type, $refid='--'){
mysql_query("INSERT INTO earn VALUES (NULL, '$user', '$income', '$refid', '$type', ".time().")");
}
}
?>
लेकिन ब्राउज़र नीचे गंभीर त्रुटि देता है ..
Fatal error: Constructor pay::pay() cannot be static in F:\xampp\htdocs\new\sts\class.php on line 41
मैं उलझन यही कारण है कि त्रुटि होने वाली .. मदद कृपया मुझे समझने के लिए कर रहा हूँ।