Специальные символы:
* - Соответствует нулю или большему количеству символов.
? - Соответствует ровно одному символу (любому символу).
[...] - Соответствует одному символу из группы. Если первый символ !, то соответствует любому символу, не входящему в группу
\ - Экранирует следующий символ, кроме случаев, когда используется флаг GLOB_NOESCAPE.
foreach (glob("*.txt") as $filename) {
echo "$filename размер " . filesize($filename) . "\n";
}
rename("/tmp/tmp_file.txt", "/home/user/login/docs/my_file.txt");
/usr/bin/flock -w 600 /var/tmp/myscript.lock /root/myscript.sh
How do I use it?
Download a precompiled binary or build from source
Create your HTML document that you want to turn into a PDF (or image)
Run your HTML document through the tool.
For example, if I really like the treatment Google has done to their logo today and want to capture it forever as a PDF:
wkhtmltopdf http://google.com google.pdf
$data = [];
foreach($array as $item) {
if ($item['category_id'] == $item['parent_id']) $data[] = $item;
}
Spout is a PHP library to read and write spreadsheet files (CSV, XLSX and ODS), in a fast and scalable way. Contrary to other file readers or writers, it is capable of processing very large files while keeping the memory usage really low (less than 3MB).
$value['description'] = 1;
$array = ['a', 'b', 'c'];
if($value['description'] == 1) {
foreach($array as $item) {
echo $item;
}
}