Run PHP Function once

后端 未结 3 1196
天涯浪人
天涯浪人 2021-01-23 02:12

Is there a way to run a PHP FUNCTION \"fun();\" only once when a logged in user accesses a page multiple times?

here is the function.



        
3条回答
  •  灰色年华
    2021-01-23 02:51

    Using authentication/sessions and storing the number of times a user has accessed that page in say a database for example or a flat file. You'll need to persist their access count to that page regardless.

提交回复
热议问题