main.php:
test();
include "include.php";

include.php:

<?php
 function test()
{

 }
 
这样的话会出错
Fatal error: Call to undefined function test() 

所以应该先包含代码段再调用,不然找不到定义的函数。

相关文章:

  • 2021-08-03
  • 2021-08-27
  • 2021-09-14
  • 2021-06-18
  • 2022-02-19
  • 2022-12-23
  • 2021-12-28
  • 2021-12-24
猜你喜欢
  • 2021-06-07
  • 2021-08-16
  • 2022-01-23
  • 2021-12-28
  • 2022-01-15
  • 2021-09-28
  • 2021-08-15
相关资源
相似解决方案