How to send a file from one Yii controller to another Yii controller -


i want transfer files between web applications. let's application file server. application b user.

from time time, application b need update scripts. , updated scripts application b.

is possible yii controller in application read file , send application b?

i imagine can use fopen open url , file. how make controller return file?

well, guess set action in controller in application a, reads , outputs files want application b download. see here examples on how that: http://php.net/manual/en/function.readfile.php

in application b would, personally, use curl download files, pass username , password applicaton restrict downloads. link offers examples on create curl request downloads file downloading large file using curl.

to download multiple files you'd need 1 of 2 things: 1) loop through array of filenames in application b correspond files in application want download, or 2) zip files in application a, , unpack them once downloaded application b http://php.net/manual/en/book.zip.php.


Comments

Popular posts from this blog

matlab - Deleting rows with specific rules -

jquery - How would i go about shortening this code? And to cancel the previous click on click of new section? -