![]() |
Network Dual-Stack Component
Version 7.0 (Beta)
MDK-Professional Middleware for IP Networking
|
HTTP server functions that work with a File System. More...
HTTP server functions that work with a File System.
All File System Interface functions are located in HTTP_Server_FS.c, which will be automatically added to your project's Network folder. The file is preconfigured for the File System Component, so no modifications are required. If you wish to use another type of file system, you need to override these weak procedures with your required functionality.
The following functions are implemented in this module:
The Web Server supports storing of web pages on a SD Card, which is attached to the embedded system. This is useful if you want to update or change the web content remotely. In this case, the File System Component is used, which must be configured for a target device Memory Card Drive.
You can use any of the update methods to change the content of web pages:
When the Web Server tries to open a web page, it searches the external file system first. This is usually an externally attached SD Card. As the Compact Web Server is not configured to use an external file system, it searches only the internal ROM file system.
If the requested file is found on the SD Card, the content is sent to the web client. If the requested file does not exist on the SD Card, it is opened from the internal ROM file system and transferred to the web client. This concept allows you to replace easily the web content from the internal ROM file system with a new one stored on the external SD Card.
You should carefully update the cgi and cgx script files, as changes in the script files usually need to be reflected in the application code, which is in the module HTTP_Server_CGI.c. If you have made a mistake in the uploaded script files, the web pages might not be accessible any more.
To enable the SD-Card File System, you need the select the Web Server in the Manage Run-Time Environment window under Network:Service: