If you use PHP to deliver web content, you can embed a Corda image using the PHP version of the Corda Embedder.
Before you can include the Corda Embedder library into a PHP page, you must first make sure that the CordaEmbedder.php file, located in the dev_tools/embedder/php folder, is accessible to your PHP pages. There are three ways of doing this:
- Copy CordaEmbedder.php to the same folder as the scripts that will use the Corda Embedder. However, this can be inconvenient if you have PHP pages that use Corda Embedder in multiple directory.
- To make CordaEmbedder.php accessible to all of your PHP pages, copy it to a shared or includes folder for your PHP server.
- The most powerful way to include the CordaEmbedder.php file is to include its path in PHP's configuration file (php.ini).
To add the Corda Embedder to PHP's include path
- Open the php.ini file in a text editor.
- Look for the
include_pathvariable. - Add the path to CordaEmbedder.php to the path list.
- Save the PHP.ini file.
You can find this file at C:\Windows\php.ini folder on Windows, and at /etc/php.ini folder for Linux/UNIX compatible systems.
If you've never used it before, you may need to uncomment it by removing the semi-colon from in front of it.
If there's already something there, you should separate the CordaEmbedder.php location from the list with a semi-colon, as illustrated below:
include_path = ".;c:\php\pear;C:\Program Files\Corda5x\dev_tools\embedder\php"
For instructions on using the Corda Embedder in PHP pages, refer to "PHP" of the PopChart+OptiMap Web Development Guide or "PHP" of the Highwire User Guide.
CORDA