[Php 4, Php 5, Php 7, Php 8]
Đổi tên - Đổi tên một tệp hoặc thư mục — Renames a file or directory
Sự mô tả
Đổi tên [Chuỗi $from
, Chuỗi $to
,? Tài nguyên $context
= null
]: Bool[string $from
, string $to
, ?resource $context
= null
]:
bool
Thông số
from
Tên cũ.
Ghi chú::
Bao bọc được sử dụng trong
from
phải khớp với trình bao bọc được sử dụng trongto
.
to
Tên mới.
Lưu ý: Trên Windows, nếu
to
đã tồn tại, nó phải được ghi. Nếu không, đổi tên [] thất bại và vấn đềE_WARNING
.: On Windows, ifto
already exists, it must be writable. Otherwise rename[] fails and issuesE_WARNING
.
$to
0Một tài nguyên luồng ngữ cảnh.resource.
Trả về giá trị
Trả về $to
1 khi thành công hoặc $to
2 về thất bại.$to
1 on success or $to
2 on failure.
Ví dụ
Ví dụ #1 Ví dụ với Đổi tên []rename[]
$to
3
Xem thêm
- Sao chép [] - Tệp bản sao
- Khai thác [] - Xóa một tệp
- Move_uploaded_file [] - Di chuyển một tệp được tải lên đến một vị trí mới
Andrew tại 21cv dot co dot uk ¶ ¶
12 năm trước
$to
4
$to
5
$to
6
$to
7ben tại indietorrent dot org ¶ ¶
7 năm trước
$to
8
$to
9
$context
0
$context
1
$context
2
$context
3Michael-Nospam tại Sal Dot Mik Dot Hyperlink Dot Net Dot Au ¶ ¶
22 năm trước
$context
4
$context
5
$context
6
$context
7
$context
3Mike ¶ ¶
8 năm trước
$context
9
null
0
null
1
null
2
$context
3pcdinh tại phpvietnam dot net ¶ ¶
13 năm trước
null
4
null
5
$context
3Whooptyn ¶
14 năm trước
null
7
null
8
$context
3Martin Pelletier ¶ ¶
11 năm trước
from
0
from
1
from
2
from
3
$context
3bcag2 tại miễn phí dot fr ¶ ¶
9 năm trước
from
5
from
6
from
7PHP tại DOT com tiêu tốn chứng khoán ¶ ¶
16 năm trước
from
8
from
9
$context
3Sophie tại Sitadelle Dot Com ¶ ¶
18 năm trước
from
1
Eric [Themepark.com] ¶ ¶
15 năm trước
from
2
Tomfelker tại Gmail Dot Com ¶ ¶
17 năm trước
from
3
from
4
$context
3David Thole [gốc tại thedarktrumpet.com] ¶ ¶
16 năm trước
from
6
from
7
from
8
from
9
to
0
$context
3Sophie tại Sitadelle Dot Com ¶ ¶
16 năm trước
to
2
Sophie tại Sitadelle Dot Com ¶ ¶
17 năm trước
to
3
to
4
to
5
to
6
to
7
$context
3David Thole [gốc tại thedarktrumpet.com] ¶ ¶
15 năm trước
to
9
to
0
to
1
to
2
to
3
to
4
to
5
to
6
to
7Tomfelker tại Gmail Dot Com ¶ ¶
17 năm trước
to
8
to
9
$context
3David Thole [gốc tại thedarktrumpet.com] ¶ ¶
13 năm trước
to
1
to
2
to
3
to
4
to
5
to
6
to
7Whooptyn ¶
16 năm trước
to
8
Sophie tại Sitadelle Dot Com ¶ ¶
16 năm trước
to
9
Sophie tại Sitadelle Dot Com ¶ ¶
18 năm trước
E_WARNING
0
E_WARNING
1
E_WARNING
2
$context
3Eric [Themepark.com] ¶ ¶
15 năm trước
E_WARNING
4
Tomfelker tại Gmail Dot Com ¶ ¶
7 năm trước
E_WARNING
5
E_WARNING
6
E_WARNING
7
$context
3Michael-Nospam tại Sal Dot Mik Dot Hyperlink Dot Net Dot Au ¶ ¶
8 năm trước
E_WARNING
9
$to
5
$to
01
13 năm trước ¶
12 năm trước
$to
03
$to
04
$to
05
$to
06ben tại indietorrent dot org ¶ ¶
7 năm trước
$to
07
$to
08
$to
09
$to
10
$context
3