2
如何上傳文件到drupal模塊文件夾位置的方式... 我正在創建一個模塊(示例),我想創建一個上傳文件,以便它應該存儲在特定的位置(文件夾)。 。使用CCK請幫我...我編寫這樣如何將文件上傳到drupal模塊中的文件夾位置?
$form['pem_file_upload'] ['certificates'] = array (
'#type' => 'file',
'#value' => 'upload',
'#title' => t('upload your certificate file'),
'#description' => t('Upload the certificate file which is helpfull in sending push messages to ios device'),
'#default_value' => variable_get('certificates', ''),
);
variable_set('certificates', $form_state['values'] ['certificates']);
$form['pem_file_upload'] ['certificates'] = array (
'#type' => 'file',
'#value' => 'upload',
'#title' => t('upload your certificate file'),
'#description' => t('Upload the certificate file which is helpfull in sending push messages to ios device'),
'#default_value' => variable_get('certificates', ''),
);
variable_set('certificates', $form_state['values']['certificates']);