About External Files

Large source files such as video and other media resources may be kept outside of the application so their loading time is highly decreased. In fact, all files that were first compiled in the application .exe must be unpacked in memory in order to be accessible by the application. This unpacking step then requires time and it can be a lot of time for very large files.

To reduce this loading time, you can leave your files outside the application EXE file: the latter in this case does not have to unpack them anymore, just to load them.


External files must be deployed with the application .exe file. That's why an installer for your application is the best way to deploy your application: the installers generated by ExeOutput for PHP can include external files in the "Data" subfolder.

Keeping large amounts of files external

Some PHP applications can have tens of thousands of files. If you want to compile them as is in your application, the latter will be slowed down a lot. While if you keep your files outside, the performance of your application even compiled with ExeOutput for PHP will remain high compared to a server hosting it.


Therefore, we recommend that you keep file-heavy and non-essential directories outside of the application EXE file. Directories such as "vendor" or framework dependencies (whose source code is available in open source) do not really have to be protected and can therefore be kept outside your application.

Set a file as external

To set a file as external, select it in the File Manager and click Properties. The "File Properties" window is displayed; turn on "Keep the selected file(s) external". ExeOutput for PHP will automatically copy the external files to the appropriate location in the "Data" subfolder.


If external files already exist in the destination folders, they will not be overwritten by ExeOutput for PHP. You have to upgrade these files yourself or simply remove the "Data" subfolder manually.

Encoding external PHP files for further security

ExeOutput for PHP lets you encrypt external PHP files, so that their contents can only be read by the application and remain invisible to end users.

The disadvantage is that external files will be systematically encrypted at each compilation of your application, so the compilation time will be longer than in case of non-encryption.

It also slighly slows down the performance of your application, because it adds another decryption step to be performed at runtime when executing the external encrypted PHP scripts.


A new encryption key is generated for each build of your application, so external encrypted PHP files cannot be shared between different applications.

See also File Properties Editor