some kind off variable problem within php class -
I have this in my class
When another function is called php errors with incorrect datatype And can only be past with variable references.
I do not know what it means
This code comes from php.net if the same code is outside the square, / P>
do I do wrong here Am I working in the classroom?
$ extensies valid = array (); Function __ composition () {$ this-> Extensies Valid = array ("txt", "pdf"); $ This- & gt; Filename = $ _FILES ['file']; } Private function isAllowedExtensie ($ fileName) {return_array (end (explosion (".", $ FileName)), $ this-> extensies are allowed;} public function check_upload () {if ($ this-> ; Filename ['error'] == UPLOAD_ERR_OK) {If the extension is valid ($ this-> filename ['name'])) {back true; arre ([best band] => ACCOUNT INFO .txt [extensies valid] = & gt;)
>
Thanks, Richard
Try putting an end and exploding in separate statements - I think the end () In any case, it will help you to figure out if the line is causing problems if it is not correct.
Comments
Post a Comment