![](/themes/images/default.png)
Hàm realpath_cache_size() trong PHP - PHP Function
Code echo "<pre>"; print_r(realpath_cache_size()); echo "</pre>";
![](/themes/images/default.png)
Hàm realpath() trong PHP - PHP Function
Code $path = './test.txt'; echo realpath($path);
![](/themes/images/default.png)
Hàm rename() trong PHP - PHP Function
Code mkdir('test'); $path = 'test/test.txt'; file_put_contents($path, 'this is a test'); rename($path, 'example.txt');
![](/themes/images/default.png)
Hàm rewind() trong PHP - PHP Function
Code $path = 'example.txt'; $fp = fopen($path, 'r+a+'); fseek($fp, 5); echo ftell($fp)."<br />"; rewind($fp); echo ftell($fp);
![](/themes/images/default.png)
Hàm rmdir() trong PHP - PHP Function
Code if (!is_dir('examples')) { mkdir('examples'); } rmdir('examples');
![](/themes/images/default.png)
Hàm symlink() trong PHP - PHP Function
Code $target = 'uploads.php'; $link = 'uploads'; symlink($target, $link); echo readlink($link);
![](/themes/images/default.png)
Hàm tempnam() trong PHP - PHP Function
Code echo $tmpfname = tempnam("./example/", "test"); $handle = fopen($tmpfname, "w"); fwrite($handle, "this is a test string"); fclose($handle);
![](/themes/images/default.png)
Hàm tmpfile() trong PHP - PHP Function
Code $temp = tmpfile(); fwrite($temp, "this is a test file content"); fseek($temp, 0); echo fread($temp, 1024); fclose($temp); // this removes the file
![](/themes/images/default.png)
Hàm touch() trong PHP - PHP Function
Code $filename = 'example.txt'; if (touch($filename)) { echo $filename . ' modification time has been changed to present time'; } else { echo 'Sorry, could not change modification time of ' . $filename; }
![](/themes/images/default.png)
Hàm checkdate() trong PHP - PHP Function
Code if (checkdate(12,3,1995) == true) { echo "ngày 12-3-1995 là ngày hợp lệ <br />"; }else{ echo "ngày 12-3-1995 là ngày không hợp lệ <br />"; } if (checkdate(30,2,1995) == true) { echo "ngày 30-2-1995 là ngày hợp lệ <br />"; }else{ echo "ngày 30-2-1995 ...
![](/themes/images/default.png)
Hàm date_add() trong PHP - PHP Function
Code $date = date_create('2017-4-30'); date_add($date, date_interval_create_from_date_string('10 days')); echo date_format($date, 'Y-m-d');
![](/themes/images/default.png)
Hàm date_create_from_format() trong PHP - PHP Function
Code $date = date_create_from_format('j-M-Y', '30-APR-2017'); echo "<pre>"; print_r($date); echo "</pre>";
![](/themes/images/default.png)
Hàm date_create() trong PHP - PHP Function
Code $date = date_create('30-04-2017'); echo "<pre>"; print_r($date); echo "</pre>";
![](/themes/images/default.png)
Hàm date_date_set() trong PHP - PHP Function
Code $date = date_create(); echo "<pre>"; print_r($date); echo "</pre>"; date_date_set($date, 1996, 02, 27); echo "<pre>"; print_r($date); echo "</pre>";
![](/themes/images/default.png)
Hàm date_default_timezone_get() trong PHP - PHP Function
Code $timezone = date_default_timezone_get(); echo $timezone;
![](/themes/images/default.png)
Hàm date_default_timezone_set() trong PHP - PHP Function
Code $timezone = date_default_timezone_get(); $date = date_create(); echo "<pre>"; print_r($date); echo "</pre>"; date_default_timezone_set('Asia/Dubai'); $date = date_create(); echo "<pre>"; print_r($date); echo "</pre>";
![](/themes/images/default.png)
Hàm date_diff() trong PHP - PHP Function
Code $datetime1 = date_create('1975-04-30'); $datetime2 = date_create('2017-04-30'); $interval = date_diff($datetime1, $datetime2); echo $interval->format('%R%y years');
![](/themes/images/default.png)
Hàm date_format() trong PHP - PHP Function
Đề bài: Sử dụng hàm date_format để định dạng thời gian Code $date = date_create(); echo date_format($date, 'Y-m-d H:i:s') . "<br />"; echo date_format($date, 'H:i:s d-m-Y '); Kết quả 2017-05-02 16:28:39 16:28:39 ...
![](/themes/images/default.png)
Hàm date_get_last_errors() trong PHP - PHP Function
Code $date = date_create('Zaidap.com.net'); echo "<pre>"; print_r(date_get_last_errors()); echo "</pre>";
![](/themes/images/default.png)
Hàm date_interval_create_from_date_string() trong PHP - PHP Function
Code $i = date_interval_create_from_date_string('3 day'); echo "<pre>"; print_r($i); echo "</pre>";