get server ram with php

后端 未结 9 1645
抹茶落季
抹茶落季 2020-12-05 00:19

Is there a way to know the avaliable ram in a server (linux distro) with php (widthout using linux commands)?

edit: sorry, the objective is to be aware of the ram av

9条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-05 00:41

    Linux commands can be run using the exec function in PHP. This is efficient and will do the job(if objective is to get the memory).

    Try the following code:

    
    

提交回复
热议问题