Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

文件(夹)数组排序/输出前应该先判断是否为空 #8

Open
wdssmq opened this issue Oct 21, 2018 · 1 comment
Open

文件(夹)数组排序/输出前应该先判断是否为空 #8

wdssmq opened this issue Oct 21, 2018 · 1 comment

Comments

@wdssmq
Copy link

wdssmq commented Oct 21, 2018

if (isset($this->file))
sort($this->file);
if (isset($this->dirdir))
sort($this->dirdir);

@wdssmq wdssmq changed the title 文件(夹)数组排序/输出前应该先判断是否 文件(夹)数组排序/输出前应该先判断是否为空 Oct 21, 2018
@wdssmq
Copy link
Author

wdssmq commented Oct 21, 2018

以上全部划掉,直接初始化为数组就行;
public $file = array();
public $dirdir = array();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant