Upload __construct(
$field
$field, [$isArray
$isArray = false]
)
|
|
»ý¼ºÀÚ
$upload = new Upload('userfile'); // ÇѰ³ ÆÄÀÏ ¾÷·Îµå ÇÒ ¶§ $upload = new Upload('userfile', true); // ¿©·¯°³ ÆÄÀÏ ¾÷·Îµå ÇÒ ¶§
Parameters:
$field |
$field: |
string form ¿¡¼ input type="file" ű×ÀÇ À̸§ |
$isArray |
$isArray: |
bool false : ¹è¿ÀÌ ¾Æ´Ô, true : ÆÄÀÏÀ» ¹è¿·Î º¸³¿ |
API Tags:
Redefinition of:
- PObject::__construct()
- »ý¼ºÀÚ
ÆÄÀÏ ¾÷·Îµå ÇöȲ º¸¿©ÁÖ±â
API Tags:
Redefinition of:
- PObject::display()
- °´Ã¼ ¹®ÀÚ¿À» Ãâ·Â
string get(
$type
$type, [$i
$i = 0]
)
|
|
¾÷·Îµå µÈ ÆÄÀÏ ¼Ó¼º ¾ò¾î¿À±â , ¸î°¡Áö ±â´ÉÀÌ Ãß°¡ µË´Ï´Ù.
php¿¡¼ Áö¿øÇÏ´Â ÆÄÀÏ ¼Ó¼º
name ¿øº» ÆÄÀÏ À̸§ type MIME Type size ÆÄÀÏ Å©±â tmp_name ÀÓ½ÃÆÄÀÏ À̸§ error ¿¡·¯ÄÚµå , ¿¡·¯ ÄÚµå °ªÀº php ¸Þ´º¾ó ÂüÁ¶
È®ÀåµÈ ¼Ó¼º
filename È®ÀåÀÚ¸¦ Á¦¿ÜÇÑ ÆÄÀÏ À̸§ ext ÆÄÀÏ È®ÀåÀÚ
ex)
$upload = new Upload('userfile'); echo $upload->get('name');
Parameters:
$type |
$type: |
string ÆÄÀÏ ¼Ó¼º (name, type, size, tmp_name, error, filename, ext) |
$i |
$i: |
int ÆÄÀÏ ¼ø¼ |
API Tags:
Return: | °¢°¢ÀÇ Å¸ÀÔº° ¼Ó¼º °ª |
Access: | public |
ÆÄÀÏ ¾÷·Îµå °³¼ö ¾ò¾î¿À±â
API Tags:
Return: | ÆÄÀÏ ¾÷·Îµå °³¼ö |
Access: | public |
int move(
[
$file = ''], [
$i = 0]
)
|
|
¾÷·ÎµåÇÑ ÆÄÀÏ ¿Å±â±â
Parameters:
API Tags:
Return: | ÆÄÀÏ ¾÷·Îµå °³¼ö |
Access: | public |
int moveAll(
[@arrFile
$arrFile = array()]
)
|
|
¾÷·ÎµåÇÑ ÆÄÀÏ ¸ðµÎ ¿Å±â±â
Parameters:
@arrFile |
$arrFile: |
array ¿Å±æ ÆÄÀÏ¸í ¸®½ºÆ® |
API Tags:
Return: | ÆÄÀÏ ¾÷·Îµå °³¼ö - À̸é Àüü ¾÷·Îµå ¼º°ø
- ÀÌ»óÀÌ¸é ÆÄÀÏ ¾÷·Îµå ¿¡·¯³ ¹øÈ£
|
Access: | public |
int moveAllUrl(
@url
$url
)
|
|
¾÷·ÎµåÇÑ ÆÄÀÏ ÇØ´ç °æ·Î·Î ¸ðµÎ ¿Å±â±â
$upload->moveAllUrl('/home/cyberuls/');
Parameters:
@url |
$url: |
string ¿Å±æ ÁÖ¼Ò |
API Tags:
Return: | ÆÄÀÏ ¾÷·Îµå °³¼ö - À̸é Àüü ¾÷·Îµå ¼º°ø
- ÀÌ»óÀÌ¸é ÆÄÀÏ ¾÷·Îµå ¿¡·¯³ ¹øÈ£
|
Access: | public |