upload

upload ( string filepathOnYourDisk , string _pathOnYourServer , boolean|default:false _returnPathOnServer ) : string

Upload a file on your server. You PHP libary must have the upload() function.

Example


upload("C:\\file.dat","/u002/echanges/aa/PLV_PROD.dat")

Parameters

filepathOnYourDisk

path of the file to upload on your local disk

_pathOnYourServer (optional)

path on your server where the file must be uploaded
On Prestashop, use the tag _PS_ROOT_DIR_ in _pathOnYourServer to design the root folder of Prestashop, ex : "_PS_ROOT_DIR_/img/p/"

_returnPathOnServer (optional)

returnPathOnServer : if true returns the path on the server of the new file, if false returns the distant url of the file accessible by the Web.