Including PHP functions from another file

前端 未结 5 2033
失恋的感觉
失恋的感觉 2021-01-20 02:01

I would like to access some functions defined in another PHP file, but that file also outputs content that I don\'t want to display.

Is there any way to access the f

5条回答
  •  一个人的身影
    2021-01-20 02:42

    Eh you might be able to do something with using the output buffer and manually clearing contents, but why not just move the common functions into a common include? I usually shove common helper methods into their own file (which won't output anything).

提交回复
热议问题