How to call function of one php file from another php file and pass parameters to it?

前端 未结 4 959
滥情空心
滥情空心 2020-12-07 19:46

I want to call a function in one PHP file from a second PHP file and also pass two parameters to that function. How can I do this?

I am very new to PHP. So please te

4条回答
  •  情书的邮戳
    2020-12-07 20:03

    Yes include the first file into the second. That's all.

    See an example below,

    File1.php :

    
    

    Now Using include (http://php.net/include) to include the File1.php to make its content available for use in the second file:

    File2.php :

    
    

提交回复
热议问题