Bu-> kullanarak

0 Cevap php

Ben PHP için yeni ve çok basit bir sınıf yazmak çalışıyorum:

<?php
    class Course {
        private $credits;
        public function getCredits() {
        return $this->credits;
        }
    }   
?>

Ben bir tarayıcıda bu yüklediğinizde sorun görüyorum edilir:

kredi; }}>

so it looks like the browser is echoing all that follows "this->" - is there something I need to configure in php.ini? thanks for any help!

0 Cevap