Skip to content

Commit 7ef288f

Browse files
committed
add strtolower and is_Dir
1 parent 7ec1c91 commit 7ef288f

File tree

2 files changed

+41
-0
lines changed

2 files changed

+41
-0
lines changed

is_dir.php

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<?php
2+
// is_dir
3+
if (is_dir("/tmp")) {
4+
echo "/tmp is a directory\n";
5+
} else {
6+
echo "/tmp is not a directory\n";
7+
}
8+
9+
if (is_dir("/etc/passwd")) {
10+
echo "/etc/passwd is a directory\n";
11+
} else {
12+
echo "/etc/passwd is not a directory\n";
13+
}
14+
15+
if (is_dir("../")) {
16+
echo "../ is a directory\n";
17+
} else {
18+
echo "../ is not a directory\n";
19+
}
20+
21+
if (is_dir("c:\\xampp\htdocs\\")) {
22+
echo "\"c:\\xampp\\htdocs\" is a directory\n";
23+
} else {
24+
echo "\"c:\\xampp\\htdocs\" is not a directory\n";
25+
}
26+
27+
if (is_dir("c:\\xampp\htdocs\\TopPHPFunctions\is_dir.php")) {
28+
echo "\"c:\\xampp\\htdocs\\TopPHPFunctions\\is_dir.php\" is a directory\n";
29+
} else {
30+
echo "\"c:\\xampp\\htdocs\\TopPHPFunctions\\is_dir.php\" is not a directory\n";
31+
}
32+

strtolower.php

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?php
2+
// strtolower
3+
$a = "HELLO WORLD";
4+
$b = strtolower($a);
5+
echo $b;
6+
7+
$a = "hello world";
8+
$b = strtolower($a);
9+
echo $b;

0 commit comments

Comments
 (0)