PHP read file comments NOT file content - forgotten

前端 未结 5 1825
灰色年华
灰色年华 2020-12-16 07:30

Sorry folks forgotten this one, I need to read the first \"batch\" of comment in a php file example would be:



        
5条回答
  •  醉酒成梦
    2020-12-16 07:35

    Use this:

    preg_match("/\/\*\*(.*?)\*\*\//", $file, $match);
    $info = $match[1];
    

提交回复
热议问题