Fix PHP code

MQL5 スクリプト

仕事が完了した

実行時間29 分

指定

Hello everybody i need to fix some  php code, pls help.

<?php 


class UploadException extends Exception 

    public function __construct($code) { 

        $message = $this->codeToMessage($code); 

        parent::__construct($message, $code); 

    } 


    private function codeToMessage($code) 

    { 

        switch ($code) { 

            case UPLOAD_ERR_INI_SIZE: 

                $message = "The uploaded file exceeds the upload_max_filesize directive in php.ini"; 

                break; 

            case UPLOAD_ERR_FORM_SIZE: 

                $message = "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form";

                break; 

            case UPLOAD_ERR_PARTIAL: 

                $message = "The uploaded file was only partially uploaded"; 

                break; 

            case UPLOAD_ERR_NO_FILE: 

                $message = "No file was uploaded"; 

                break; 

            case UPLOAD_ERR_NO_TMP_DIR: 

                $message = "Missing a temporary folder"; 

                break; 

            case UPLOAD_ERR_CANT_WRITE: 

                $message = "Failed to write file to disk"; 

                break; 

            case UPLOAD_ERR_EXTENSION: 

                $message = "File upload stopped by extension"; 

                break; 


            default: 

                $message = "Unknown upload error"; 

                break; 

        } 

        return $message; 

    } 


// Use 

if ($_FILES['file']['error'] === UPLOAD_ERR_OK) { 

//uploading successfully done 

} else { 

throw new UploadException($_FILES['file']['error']); 

?> 

応答済み

1
開発者 1
評価
プロジェクト
1
0%
仲裁
0
期限切れ
0
類似した注文
Hi there, I am offering $30 usd for someone to convert four pictures I have to metatrader icons(arrows) that I can use in both MT4 & MT5. We all know that we can change arrows on the chart by using a different arrow code, but the arrows in metatrader are boring and I want to use custom ones. I want the four attached pictures as icons that i can use with indicators that give the option to choose your arrow type. I
I need an expert to decrypt my itf file using on prorealtime. I forgot my password, so I need to generate the source code. I need someone that can help me to derive source code from the itf file I have

プロジェクト情報

予算
10 - 30 USD
開発者用
9 - 27 USD
締め切り
最高 1 日