想要使web目录下,某目录下的文件列表显示而不是显示"You don't have permission to access / on this server" 需要在httpd.conf文件中加上下面的配置信息,路径可以是绝对路径,最好它加在httpd.conf文件的最下方,并注释 <Directory "../htdocs/test"> Options Indexes FollowSymLinks</Directory> 去掉"
#自定义函数: import ospath="D:\\Temp_del\\a"def gci (path): """this is a statement""" parents = os.listdir(path) for parent in parents: child = os.path.join(path,parent) #print(child) if os.path.isdir(child): gci(child)