I
I
Ilya Loopashko2021-02-12 08:26:40
PHP
Ilya Loopashko, 2021-02-12 08:26:40

Is the method correct?

Hello. I'm just learning programming.

I have a class:

class DbBox extends BoxAbstract
{
    public function save()
    {

    }

    public function load()
    {

    }
}


This class has two methods, Load and Save. How to format them correctly so that they can save data to a file?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vladislav Lyskov, 2021-02-12
@Vlatqa

Everything is simple
here In the load method you need to write code to open the file, and in the save method to save the file

H
HemulGM, 2021-02-12
@HemulGM

You have already issued them, and now just write the code for reading and writing to a file.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question