Open the file xampp\php\php.ini
post_max_size = 500M
upload_max_filesize = 500M
max_execution_time = 300
max_input_time = 500
memory_limit = 1000M
Reboot MySQL and Apache, on the “import” window, it may not show 500M in the Maximum place, I can’t remember clearly. But when I re-import the file, it still shows “Script timeout passed, if you want to finish import, please resubmit same file and import will resume.”
Then I go to xampp\phpMyAdmin\config.inc.php, add this line
$cfg[‘ExecTimeLimit’] = 0;
It’s said it can make the limit to infinity.
Then I reboot MySQL and Apache and re-import, it shows “MySQL has gone away”, I increase the limit in the configuration file of MySQL, finial I succeed.
If you don’t know the path, you can use “dirname(__FILE__)” to get it.
If you want to test it, set time to “every minute”. If it output something on the webpage: mycron.php, like echo, “this will be shown on the webpage”; , it will send you an email. If no output to the webpage, no email.
Scope Resolution Operator (::)
The Scope Resolution Operator (also called Paamayim Nekudotayim) or in simpler terms, the double colon
“As of PHP 5.3.0, it’s possible to reference the class using a variable. The variable’s value can not be a keyword (e.g. self, parent and static). ”
arrow operator ->
under license GNU GPL.
Demo: click here
download: click here
manual: click here
The basic idea is to target the action of the form to a hidden iframe. When the form is submitted, theoutcome is shown in iframe. Since it’s hidden, the user can’t see it. This function is realized by the”target” property of the form.
The code on the webpage:
<form enctype=”multipart/form-data” id=”upload_files_form” target=”upload_target” method=”post” action=”upload.php”>
<input type=”hidden” name=”MAX_FILE_SIZE” value=”10000000″>
<input name=”upfile” type=”file” />
<button name=”submit” type=”submit”>click here to upload files</button>
<iframe id=”upload_target” name=”upload_target” style=” display:none;” ></iframe>
The code on upload.php:
//here ud_pics.php includes a class to upload files
$ud = new UD_PICS();
$upload = $ud->upload_pics(”,”);
window.top.window.stopUpload(<?php echo $outcome; ?>);