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
Свободен
Похожие заказы
Hello, thank you for your interest in my project. I want to develop a simple piece of code in ninjascript that does not exceed 8 lines of code. I will give the details of the code in the messages. the work is urgent Thank you
Need to copy the trades and orders generated by expert advisors from my MT4 platform to eToro broker. Etoro offers a trading API (). This could be used to make the connection to their propietary web platform. If the programmer considers there is more stable and faster way to do it then I'm open to suggestions
I have some specific conditions that i want to check during FVG, OB, BB, MSS, BOS, etc. but lets tell them in private if you will choose to work with me
DON'T REACH OUT IF YOU CAN'T CONVERT STRATEGY ON TRADINGVIEW TO A WELL AUTOMATED EXPERT ADVISOR THAT RUN WITHOUT PROBLEM ON METATRADER 5 Well, I am only looking for a programmer who is proficient in coding and can turn strategy on tradingview to a well customized expert advisor, please reach out if you can work timely on exactly what I just said
I want to pull a fib, with set entry price at a certain percentage, with stopploss set at another percentage of the fib. Risk is set in USD. Risk to match stop loss level. TP is set as ratio to stop loss. Calculate no. of contracts. A hot key for buy and one for sell. Illustration: In settings Inputs: Fib% to be displayed Entry level fib% stop loss fib percentage TP ratio Risk in USD or account percentage Operation
I need help with creating a website traders chatroom, it must show traders online,offline,inactive. the chatroom top section must show four clocks with different times and time scale like this.. the chatroom must have a history data of up to 10days, then longer history must be deleted automatically. if you have better chatroom please say your recommendations
I have a python script that connects MT5 to Deriv for binary trading which is having some bug. It stops executing trades after a while. I need someone to check the code and fix it. Negotiable price

Информация о проекте

Бюджет
10 - 30 USD
Исполнителю
9 - 27 USD
Сроки выполнения
до 1 дн.