[英]How to Move file in wordpress on plugin activation
I want to move file in wordpress on plugin activation . 我想在插件激活时在wordpress中移动文件。 i have written a code for this but it is not working .
我已经为此编写了代码,但是没有用。
function onactivation_install(){
$src = ABSPATH . 'wp-content/plugins/sinetiks-schools/plugin_list.php';
$dest = get_template_directory();
$full_path = $dest.'/';
$flag = wp_handle_upload($src,$full_path);
var_dump($flag); }
register_activation_hook( __FILE__,'onactivation_install' );
传递此参数
$flag = wp_handle_upload($src,array( 'test_form' => false ));
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.