查找项目中使用的.php 接口名
def action():
apiurls = []
for p in paths:
if not os.path.isfile(p):
print p
break
f = open(p,'r').read()
res = re.findall('@\"(.*).php\"',f)
# print res
if res is not None and len(res) > 0:
apiurls.extend(res)
apidict = {}
for api in apiurls:
api = api.replace('%@','')
api += '.php'
apidict[api] = api
return apidict
keys = action().keys()
print len(keys)