Is PHP serialization a good choice for storing data from a small website modified by one person

I am planning a PHP website architecture. It will be a small website with few visitors and a small data set. Data is changed exclusively by one user (administrator).

To simplify the task, I do not want to worry about a real database or XML data. I am thinking of storing all the data through PHP serialization into multiple files. For example, if there are several categories, I will store an array containing Categoryclass instances for each category.

Are there any pitfalls using PHP serialization in these circumstances?

+3
source share
4 answers

Using databases is not so difficult, and any additional time will be well studied using the database.

The traps that I see are mentioned in Yehonatan:

1. .
  2. .
  3. - "hackthissite.org". , - .
  4. , . - , , .

+2

, .

, .

+1

, , ​​ sqlite, db. , . ( ) , .

0

PHP -. , , :

:

  • . SQL-, .. ( SQL- ).

  • . , -. PHP , .., - . Sqlite - , , PHP.

  • ( , Microsoft SQL Server Oracle ..).

  • , ( ).

:

  • , " ". , -/ . , . , , , . , select count(1) from Products, PHP , , , .

  • , , , SQL-.

PHP -, , :

  • , , PHP ,

  • - ,

  • .

0

Source: https://habr.com/ru/post/1754545/


All Articles