axew3.com

Category: Php tips and hints

  • Extract (ever) correct domain name for cookie – php function

    by

    This function extract and return, the correct domain name for any passed value. Get ever the correct cookie domain name, iterating into array only one time: switch if on localhost: (on WP_w3all plugin phpBB/WP) Get complete Domains Names list updated at runtime (array) The more convenient code that i’ve find out in mind, to get…

  • Prevent Warning: POST Content-Length of bytes exceeds the limit – how to fix smartly

    by

    When a form multipart/form-data is submitted to send a file, if dimension of submitted file on form to be uploaded, exceeds the dimension of MAX_FILE_SIZE value,  PHP emit a warning and the $_FILES global is empty. Warning: POST Content-Length of …. bytes exceeds the limit In WordPress you have something like: Warning: POST Content-Length of…