Answer the question
In order to leave comments, you need to log in
How to format an entry as an associative array in JSON format in PHP?
Good afternoon, ladies and gentlemen.
- I create a named array using array()
- I encode it using json_encode
- I
write it to a local
file :
... then, according to the above points, the new file after appending in JSON format will be like this:[ {первая запись} {вторая запись} ]
{ "test" : "test" }
{ "test" : "test", "0" : { первая запись }, "1" : { вторая запись } }
{"0" : { первая запись } , "1" : { вторая запись } }
Answer the question
In order to leave comments, you need to log in
ln /files/by-group/group1 /files/user/user1/group1
If the /files/user/user1/group1 directory already exists, save all the data from it, delete it, and then run the command.
Not an expert, but:
Mount /files/by-group/group1 to /files/user/user1/group1
use symlin on the folder /files/user/user1/group1
Move or delete all data from /files/user/user1/group1 then:
rm -rf /files/user/user1/group1 && ln -s /files/by-group/group1 /files/user/user1/group1
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question