> For the complete documentation index, see [llms.txt](https://gitbook-88.gitbook.io/ctf-writeup/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gitbook-88.gitbook.io/ctf-writeup/2021/2021-ciscn/easy_source.md).

# easy\_source

<https://r0yanx.com/2020/10/28/fslh-writeup/>

本来原题有提示扫描源码，有个不常见的源码文件index.php.swo。

然后说文件里面还有什么，这里指的是注释，所以使用PHP一个原生类，读取文件注释。

```
$method = new ReflectionMethod('User', 'b');
var_dump($method->getDocComment());
```

类ReflectionMethod('User', 'b')实例化User类的b方法。

getDocComment读取注释。
