(Created page with '{{CKFinder_2.x V1 Integration Properties}} {{#CUSTOMTITLE:PHP Integration}}') |
|||
Line 1: | Line 1: | ||
− | + | == PHP integration == | |
− | + | ||
+ | The PHP integration method might be useful if you haven't worked with JavaScript before or the JavaScript integration seems to be too complicated. | ||
+ | |||
+ | === Step 1: Loading CKFinder === | ||
+ | |||
+ | To load CKFinder, we need to include a CKFinder class definition first. | ||
+ | |||
+ | Supposing that you have [[CKFinder_2.x/Developers_Guide/{{{language}}}/Installation|installed]] CKFinder at the "ckfinder" directory at the root of your web site, here you have an example: | ||
+ | |||
+ | <source language="php"> | ||
+ | <?php | ||
+ | require_once 'ckfinder/ckfinder.php'; | ||
+ | ?> | ||
+ | </source> | ||
+ | With the above file loaded, the CKFinder class is ready to be used. | ||
+ | |||
+ | === Step 2: Creating an Application Instance === | ||
+ | |||
+ | Next thing to do, to have the CKFinder up & running, is creating an application instance: | ||
+ | <source lang="php"> | ||
+ | <?php | ||
+ | $finder = new CKFinder(); | ||
+ | $finder->BasePath = '/ckfinder/'; | ||
+ | $finder->Create(); | ||
+ | ?> | ||
+ | </source> | ||
+ | (put this code anywhere inside of the <code><body></code> tag). For an example please check the standalone sample distributed with CKFinder (_samples/php/standalone.php). |
Revision as of 14:54, 17 May 2010
PHP integration
The PHP integration method might be useful if you haven't worked with JavaScript before or the JavaScript integration seems to be too complicated.
Step 1: Loading CKFinder
To load CKFinder, we need to include a CKFinder class definition first.
Supposing that you have [[CKFinder_2.x/Developers_Guide/{{{language}}}/Installation|installed]] CKFinder at the "ckfinder" directory at the root of your web site, here you have an example:
<?php require_once 'ckfinder/ckfinder.php'; ?>
With the above file loaded, the CKFinder class is ready to be used.
Step 2: Creating an Application Instance
Next thing to do, to have the CKFinder up & running, is creating an application instance:
<?php $finder = new CKFinder(); $finder->BasePath = '/ckfinder/'; $finder->Create(); ?>
(put this code anywhere inside of the <body>
tag). For an example please check the standalone sample distributed with CKFinder (_samples/php/standalone.php).