Re: get size of variable n bytes
| From: | David Nicholson | Date: | Wed, 16 Jul 2003 16:29:00 +0000 |
| Subject: | Re: get size of variable n bytes | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-155464@lists.php.net to get a copy of this message | ||
Hello,
This is a reply to an e-mail that you wrote on Wed, 16 Jul 2003 at 16:35,
lines prefixed by '>' were originally written by you.
> Yes, well, that complicates things.
> You see, I'm trying to determine the size that the $_POST variable
> will be
> in bytes, because there is a byte limit in the php.ini file for POST
> variable size, so I was hoping for something easy like
> bytes_size($_POST)...
> Would also be handy to calculate how much memory your script will
> use/need.
> So, you say there is no such function or no way to determine it?
The POST data is all sent as text anyway so what I said about assuming 1
character = 1 byte will be the best way of calculatuing the size of the
entire request (remember to include all variable names, ?, & and =
characters as well though).
David.
--
phpmachine :: The quick and easy to use service providing you with
professionally developed PHP scripts :: http://www.phpmachine.com/
Professional Web Development by David Nicholson
http://www.djnicholson.com/
QuizSender.com - How well do your friends actually know you?
http://www.quizsender.com/
(developed entirely in PHP)