PHP read file comments NOT file content - forgotten

前端 未结 5 1820
灰色年华
灰色年华 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:41

    There's a token_get_all($code) function which can be used for this and it's more reliable than you first might think.

    Here's some example code to get all comments out of a file (it's untested, but should be enough to get you started):

    
    

提交回复
热议问题