# как обычно, с символа '#' начинаются комментарии
# в качестве командного интерпретатора использовать /bin/sh
SHELL=/bin/sh
# результаты работы отправлять по этому адресу
MAILTO=paul@example.org
# добавить в PATH домашний каталог пользователя
PATH=/bin:/usr/bin:/home/paul/bin
*/5 * * * * echo "Прошло пять минут"
повесить таску в кроне
$red = $zip->getFromIndex(2);
echo '<img src="data:image/png;base64,'.$red.'" />';
<img src="data:image/png;base64,ÿØÿàJFIF``ÿáîExifMM*;J‡iVœÎê>ê
" />
А чем Вас не устраивает $numFiles?
echo '<img src="'. $numFiles .'" />'; == '<img src="5" />';
<img src="???????????" />
get_post_meta(get_the_ID(), 'test_file', true);
wp_get_attachment_url ( get_post_meta(get_the_ID(), 'test_file', true) );
Есть ли способ с помощью PHP скачать файл из базы данных wordpress?
get_post_meta(get_the_ID(), 'test_file', true)
function pchv_ew_template_redirect() {
if ($_SERVER['REQUEST_URI']=='/wor/downloads/result.csv') {
$fn = ' http://localhost/wor/wp-content/uploads/2018/12/BI7GI_8-01_IL_01-k1.jpg'; // Получаум опцию
header("Content-type: application/x-msdownload",true,200);
header("Content-Disposition: attachment; filename=result".date("_d.m.y_H:i:s").".jpg");
header("Pragma: no-cache");
header("Expires: 0");
readfile($fn);
exit();
}
}
<br />
<b>Warning</b>: Use of undefined constant _DIR_ - assumed '_DIR_' (this will throw an Error in a future version of PHP) in <b>C:\xampp\htdocs\wor\wp-content\plugins\plagin downlode\index.php</b> on line <b>22</b><br />
<br />
<b>Warning</b>: readfile(_DIR_/tocsv.csv): failed to open stream: No such file or directory in <b>C:\xampp\htdocs\wor\wp-content\plugins\plagin downlode\index.php</b> on line <b>28</b><br />
add_action('template_redirect','pchv_ew_template_redirect');
function pchv_ew_template_redirect() {
if ( get_post_meta(get_the_ID(), 'test_file', true) ){
$GET11 = wp_get_attachment_url ( get_post_meta(get_the_ID(), 'test_file', true) );
if ($_SERVER['REQUEST_URI']== '/wor/ru/2018/12/04/frtt/') {
$opt = unserialize(get_option('import_info')); // Получаум опцию
if (!$opt['resultfile']) { exit; }
header("Content-type: application/x-msdownload",true,200);
header("Content-Disposition: attachment; filename=result".date("_d.m.y_H:i:s").".jpg");
header("Pragma: no-cache");
header("Expires: 0");
readfile($opt['resultfile']);
exit();
}}}