# SAPI Marco SG

- Thread: https://externals.io/message/15533
- Original archive: https://news-web.php.net/php.internals/15533
- Started by Arjun Jain on 2005-03-22T08:40:11+00:00
- Messages: 2
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #15533 — Arjun Jain — 2005-03-22T08:40:11+00:00

URL: https://externals.io/message/15533#15533

Hi everyone,

How do I use the macro to get the information regading the orignal file name, temp file name, size etc of the file uploaded using SG(rfc1867_uploaded_files)? I found out that this returns a HashTable *. What to do next? How do I get the string names and integer size of the uploaded file?

Thanking you in advance,

Regards
aj
http://arjun.notlong.com


P.S. I am sorry if I have been asking stupid questions, but there is zilch documentation available, so i dont have another option :-).

---

## #15534 — Johannes Schlueter — 2005-03-22T08:51:44+00:00

URL: https://externals.io/message/15533#15534 · In reply to: #15533

Arjun Jain wrote:

> Hi everyone,
> 
> How do I use the macro to get the information regading the orignal file
> name, temp file name, size etc of the file uploaded using
> SG(rfc1867_uploaded_files)? I found out that this returns a HashTable *.
> What to do next? How do I get the string names and integer size of the
> uploaded file?

hash_tables can be acces with the functions from zend_hash.c/zend_hsh.h 
http://lxr.php.net/source/ZendEngine2/zend_hash.c
http://lxr.php.net/source/ZendEngine2/zend_hash.h
As Kamesh wrote "SG(rfc1867_uploaded_files) will have a list of filenames
uploaded." so you need to get filesize and so on yourself.

> P.S. I am sorry if I have been asking stupid questions, but there is zilch
> documentation available, so i dont have another option :-).

There is quite a huge amount of documentation available. It's called
"source" or sometime "source code" ;-)
LXR (see link above) and your local search tools can do a quite well job in
finding information about using stuff in there. Just check how others use
the global....

johannes
-- 
Johannes Schlüter                           Mayflower GmbH / ThinkPHP
http://thinkphp.de                            http://blog.thinkphp.de
