Revised upload php files, fixed a type in index.js