config.php
上传用户:wlfwy2004
上传日期:2016-12-12
资源大小:33978k
文件大小:10k
源码类别:

Jsp/Servlet

开发平台:

Java

  1. <?php 
  2. /*
  3.  * FCKeditor - The text editor for internet
  4.  * Copyright (C) 2003-2005 Frederico Caldeira Knabben
  5.  * 
  6.  * Licensed under the terms of the GNU Lesser General Public License:
  7.  *  http://www.opensource.org/licenses/lgpl-license.php
  8.  * 
  9.  * For further information visit:
  10.  *  http://www.fckeditor.net/
  11.  * 
  12.  * File Name: config.php
  13.  *  Configuration file
  14.  * 
  15.  * File Authors:
  16.  *  Grant French (grant@mcpuk.net)
  17.  */
  18. session_start();
  19. /*------------------------------------------------------------------------------*/
  20. /* HTTP over SSL Detection (shouldnt require changing) */
  21. /*------------------------------------------------------------------------------*/
  22. $fckphp_config['prot']="http";
  23. $fckphp_config['prot'].=((isset($_SERVER['HTTPS'])&&$_SERVER['HTTPS']=='on')?"s":"");
  24. $fckphp_config['prot'].="://";
  25. /*==============================================================================*/
  26. /*------------------------------------------------------------------------------*/
  27. /* The physical path to the document root, Set manually if not using apache */
  28. /*------------------------------------------------------------------------------*/
  29. //$fckphp_config['basedir']=$_SERVER['DOCUMENT_ROOT'];
  30. $fckphp_config['basedir'] = 'D:WorkFCKeditorwwwFCKeditor.V2editorfilemanagerbrowsermcpuk' ;
  31. /*==============================================================================*/
  32. /*------------------------------------------------------------------------------*/
  33. /* Prefix added to image path before sending back to editor */
  34. /*------------------------------------------------------------------------------*/
  35. $fckphp_config['urlprefix']=$fckphp_config['prot'].$_SERVER['SERVER_NAME'];
  36. /*==============================================================================*/
  37. /*------------------------------------------------------------------------------*/
  38. /* Path to user files relative to the document root (no trailing slash) */
  39. /*------------------------------------------------------------------------------*/
  40. $fckphp_config['UserFilesPath'] = "/UserFiles" ;
  41. /*==============================================================================*/
  42. /*------------------------------------------------------------------------------*/
  43. /* Progressbar handler (script that monitors upload progress) (''=none)
  44. /*------------------------------------------------------------------------------*/
  45. // $fckphp_config['uploadProgressHandler']=''; //No upload progress handler
  46. $fckphp_config['uploadProgressHandler']=$fckphp_config['prot'].$_SERVER['SERVER_NAME']."/cgi-bin/progress.cgi"; //Perl upload progress handler
  47. /*==============================================================================*/
  48. /*------------------------------------------------------------------------------*/
  49. /* Authentication (auth) :- */
  50. /*  - Req :: Boolean, whether authentication is required */
  51. /*  - HandlerClass :: Name of class to handle authentication in connector */
  52. /*------------------------------------------------------------------------------*/
  53. $fckphp_config['auth']['Req']=false;
  54. $fckphp_config['auth']['HandlerClass']='Default';
  55. /*==============================================================================*/
  56. /*------------------------------------------------------------------------------*/
  57. /* Settings for authentication handler :- */
  58. /*  - SharedKey :: Shared encryption key (as set in test.php in example) */
  59. /*------------------------------------------------------------------------------*/
  60. $fckphp_config['auth']['Handler']['SharedKey']="->Shared_K3y-F0R*5enD1NG^auth3nt1caT10n'Info/ToFILE,Brow5er--!";
  61. /*==============================================================================*/
  62. /*------------------------------------------------------------------------------*/
  63. /* Per resource area settings:- */
  64. /* - AllowedExtensions :: Array, allowed file extensions (in lowercase) */
  65. /* - AllowedMIME :: Array, allowed mime types (in lowercase) */
  66. /* - MaxSize :: Number, Maximum size of file uploads in KBytes */
  67. /* - DiskQuota :: Number, Maximum size allowed for the resource area */
  68. /* - HideFolders :: Array, RegExp, matching folder names will be hidden */
  69. /* - HideFiles :: Array, RegExp, matching file names will be hidden */
  70. /* - AllowImageEditing :: Boolean, whether images in this area may be edited */
  71. /*------------------------------------------------------------------------------*/
  72. //First area options are commented
  73. //File Area
  74. $fckphp_config['ResourceAreas']['File'] =array(
  75. //Files(identified by extension) that may be uploaded to this area
  76. 'AllowedExtensions' => array("zip","doc","xls","pdf","rtf","csv","jpg","gif","jpeg","png","avi","mpg","mpeg","swf","fla"),
  77. //Not implemented yet
  78. 'AllowedMIME' => array(),
  79. //Set the maximum single upload to this area to 2MB (2048Kb)
  80. 'MaxSize' => 2048,
  81. //Set disk quota for this resource area to 20MB
  82. 'DiskQuota' => 20,
  83. //By Default hide all folders starting with a . (Unix standard)
  84. 'HideFolders' => array("^."), 
  85. //By Default hide all files starting with a . (Unix standard)
  86. 'HideFiles' => array("^."), 
  87. //Do not allow images to be edited in this resource area
  88. 'AllowImageEditing' => false
  89. );
  90. //Image area
  91. $fckphp_config['ResourceAreas']['Image'] =array(
  92. 'AllowedExtensions' => array("jpg","gif","jpeg","png","tiff","tif",),
  93. 'AllowedMIME' => array(),
  94. 'MaxSize' => 1024,
  95. 'DiskQuota' => 5,
  96. 'HideFolders' => array("^."),
  97. 'HideFiles' => array("^."),
  98. 'AllowImageEditing' => false //Not yet complete, but you can take a look and see
  99. );
  100. //Flash area
  101. $fckphp_config['ResourceAreas']['Flash'] =array(
  102. 'AllowedExtensions' => array("swf","fla"),
  103. 'AllowedMIME' => array(),
  104. 'MaxSize' => 1024,
  105. 'DiskQuota' => 5,
  106. 'HideFolders' => array("^."),
  107. 'HideFiles' => array("^."),
  108. 'AllowImageEditing' => false
  109. );
  110. //Media area
  111. $fckphp_config['ResourceAreas']['Media'] =array(
  112. 'AllowedExtensions' => array("swf","fla","jpg","gif","jpeg","png","avi","mpg","mpeg"),
  113. 'AllowedMIME' => array(),
  114. 'MaxSize' => 5120,
  115. 'DiskQuota' => 20,
  116. 'HideFolders' => array("^."),
  117. 'HideFiles' => array("^."),
  118. 'AllowImageEditing' => false
  119. );
  120. /*==============================================================================*/
  121. /*------------------------------------------------------------------------------*/
  122. /* Global Disk Quota - Max size of all resource areas */
  123. /*------------------------------------------------------------------------------*/
  124. $fckphp_config['DiskQuota']['Global']=50; //In MBytes (default: 50mb)
  125. /*==============================================================================*/
  126. /*------------------------------------------------------------------------------*/
  127. /* Directory and File Naming :- */
  128. /*  -MaxDirNameLength :: Maximum allowed length of a directory name */
  129. /*  -DirNameAllowedChars :: Array of characters allowed in a directory name */
  130. /*  -FileNameAllowedChars :: Array of characters allowed in a file name */
  131. /*------------------------------------------------------------------------------*/
  132. $fckphp_config['MaxDirNameLength']=25;
  133. $fckphp_config['DirNameAllowedChars']=array();
  134. //Allow numbers
  135. for($i=48;$i<58;$i++) array_push($fckphp_config['DirNameAllowedChars'],chr($i));
  136. //Allow lowercase letters
  137. for($i=97;$i<123;$i++) array_push($fckphp_config['DirNameAllowedChars'],chr($i));
  138. //Allow uppercase letters
  139. for($i=65;$i<91;$i++) array_push($fckphp_config['DirNameAllowedChars'],chr($i));
  140. //Allow space,dash,underscore,dot
  141. array_push($fckphp_config['DirNameAllowedChars']," ","-","_",".");
  142. $fckphp_config['FileNameAllowedChars']=$fckphp_config['DirNameAllowedChars'];
  143. array_push($fckphp_config['FileNameAllowedChars'],')','(','[',']','~');
  144. /*==============================================================================*/
  145. /*------------------------------------------------------------------------------*/
  146. /* Debugging :- */
  147. /*  - Debug :: Boolean, if set to true a copy of the connector output is  */
  148. /* sent to a file as well as to the client. */
  149. /*  - DebugOutput :: File to send debug output to (absolute path) */
  150. /*------------------------------------------------------------------------------*/
  151. $fckphp_config['Debug']=false;
  152. $fckphp_config['DebugOutput']="/var/www/fckeditor/htdocs/FCKeditor/data/fck_conn_dbg";
  153. #Log PHP errors
  154. $fckphp_config['Debug_Errors']=false;
  155. $fckphp_config['Debug_Trace']=false;
  156. #Log Connector output
  157. $fckphp_config['Debug_Output']=false;
  158. #With each logged event display contents of
  159. /* $_GET */ $fckphp_config['Debug_GET']=false;
  160. /* $_POST */ $fckphp_config['Debug_POST']=false;
  161. /* $_SERVER */ $fckphp_config['Debug_SERVER']=false;
  162. /* $_SESSIONS */ $fckphp_config['Debug_SESSIONS']=false;
  163. /*==============================================================================*/
  164. /*------------------------------------------------------------------------------*/
  165. /* Internals :- */
  166. /* ResourceTypes :: Array of valid resource areas */
  167. /* Commands :: Array of valid commands accepted by the connector */
  168. /*------------------------------------------------------------------------------*/
  169. $fckphp_config['ResourceTypes'] = array('File','Image','Flash','Media');
  170. $fckphp_config['Commands'] = array(
  171. "CreateFolder",
  172. "GetFolders",
  173. "GetFoldersAndFiles",
  174. "FileUpload",
  175. "Thumbnail",
  176. "DeleteFile",
  177. "DeleteFolder",
  178. "GetUploadProgress",
  179. "RenameFile",
  180. "RenameFolder"
  181. );
  182. /*==============================================================================*/
  183. ?>