MODS Sample Simple CGI - vletroye/SynoPackages GitHub Wiki
Description
This is a Package for Synology created with 'Mods Packager'. It displays a simple php website in a DMS' iFrame without any dependency on the Package Init_3rdparty. (One difference is that Init_3rdparty runs the php scripts as root while here they are run as http).
It's based on a post of Rob Van Aarle explained in details here
It contains 1 item:
- MODS Simple Cgi Website: this is a website sample based on Banago's code.
Notice
The website menu contains an entry named "Post&Get". It can be used to display a page where you can test both "Get" (via en hyperlink) and "Post" (via a form). Fill the 3 fields A, B and C in the form and submit those values (it's using a Post). The page will be refreshed and the posted values will appear as parameters in the Query String of the hyperlink. Click that hyperlink to reload the page (it's using a Get). The values of the Query String are now used to populate the fields of the form. You can now loop ;)
Use of Post and Get parameters was not illustrated in the package "MODS Advanced Test CGI"
The website also contains an entry named "Ajax". It can be used to test Ajax calls to the server. Here, the calls retrieve the content of a text file... This illustrates that using JS scripts work fine.
An Image is used within the CSS. This illustrates that ressources like CSS and images work fine.
Making of
All explanations are given here.