Page 1 of 1

ini_set() question....

Posted: Sat Dec 18, 2004 10:11 am
by neophyte
I"m writing a file upload script. My script requires a larger max_file_size be set in the php ini. So I'm using ini_set to change the size allowable. But my script keeps dieing. It would seem that it is not executing. Here's what I'm using.

Code: Select all

<?php
if ( ini_set("upload_max_filesize ", $max_file_size ) )
{
//Do stuff to the file

}
else
{
die("php ini not set");

}

?>
I keep geting php ini not set. Could this be because the script timed out?
Thanks

Posted: Sat Dec 18, 2004 10:18 am
by John Cartwright
Quote from php.net
Sets the value of the given configuration option. Returns the old value on success, FALSE on failure. The configuration option will keep this new value during the script's execution, and will be restored at the script's ending.
Unless you have register globals on your script will never be TRUE, therefor, will aways DIE.