Igor Simic
2 years ago

problem: #javascript and #php file upload error:

"Missing boundary in multipart/form-data POST data"

solution:

                    // remove this line
xhr.setRequestHeader("Content-Type", "multipart/form-data");
                  

...it set by browser so you do not need it

Vizenzo Caponera
2 years ago

how to use #XAMPP #PHP version as a default one on your Mac:

1. open terminal and type:

                    sudo nano ~/.bash_profile
                  

2. add this and save file:

                    export XAMPP_HOME=/Applications/XAMPP
export PATH=${XAMPP_HOME}/bin:${PATH}
export PATH
                  

open terminal and type:

                    php -v
                  

you should see your #php version:

                    PHP 8.1.2 (cli) (built: Jan 20 2022 05:55:20) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.2, Copyright (c) Zend Technologies
                  
Jason Miller
3 years ago

simple #HTML rendered in #PHP

                    function renderHtml($contentRenderer = null)
{
    echo "<!DOCTYPE HTML>n";
    echo '<html>';
    if ($contentRenderer) $contentRenderer();
    echo '</html>';
}
                  
Igor Simic
3 years ago

continues integration for #PHP #Laravel pojects using #Jenkins