Pomoc - Szukaj - U¿ytkownicy - Kalendarz
Pe³na wersja: [PHP] Problem z uloadowaniem fotek przez fck editor
Forum PHP.pl > Forum > Przedszkole
servs
Witam!
Mam taki problem: Nie mogê poprawnie skonfigurowaæ swojego edytora: nie mogê uploadowaæ fotek. Czepia siê pliku editor/filemanager/connectors/php/config.php
Pisze tak¿e This connectors is disabled...

Wysy³am moj± wersjê tego pliku:
  1. <?php
  2. /*
  3.  * FCKeditor - The text editor for Internet - <a href=\"http://www.fckeditor.net\" target=\"_blank\">http://www.fckeditor.net</a>
  4.  * Copyright (C) 2003-2007 Frederico Caldeira Knabben
  5.  *
  6.  * == BEGIN LICENSE ==
  7.  *
  8.  * Licensed under the terms of any of the following licenses at your
  9.  * choice:
  10.  *
  11.  * - GNU General Public License Version 2 or later (the "GPL")
  12.  * <a href=\"http://www.gnu.org/licenses/gpl.html\" target=\"_blank\">http://www.gnu.org/licenses/gpl.html</a>
  13.  *
  14.  * - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
  15.  * <a href=\"http://www.gnu.org/licenses/lgpl.html\" target=\"_blank\">http://www.gnu.org/licenses/lgpl.html</a>
  16.  *
  17.  * - Mozilla Public License Version 1.1 or later (the "MPL")
  18.  * <a href=\"http://www.mozilla.org/MPL/MPL-1.1.html\" target=\"_blank\">http://www.mozilla.org/MPL/MPL-1.1.html</a>
  19.  *
  20.  * == END LICENSE ==
  21.  *
  22.  * Configuration file for the File Manager Connector for PHP.
  23.  */
  24.  
  25. global $Config ;
  26.  
  27. // SECURITY: You must explicitly enable this "connector". (Set it to "true").
  28. // WARNING: don't just set "$Config['Enabled'] = true ;", you must be sure that only 
  29. // authenticated users can access this file or use some kind of session checking.
  30. $Config['Enabled'] = false ;
  31.  
  32.  
  33. // Path to user files relative to the document root.
  34. $Config['UserFilesPath'] = '../../../../../../images/products/' ;
  35.  
  36. // Fill the following value it you prefer to specify the absolute path for the
  37. // user files directory. Useful if you are using a virtual directory, symbolic
  38. // link or alias. Examples: 'C:MySiteuserfiles' or '/root/mysite/userfiles/'.
  39. // Attention: The above 'UserFilesPath' must point to the same directory.
  40. $Config['UserFilesAbsolutePath'] = '../../../../../../images/products/' ;
  41.  
  42. // Due to security issues with Apache modules, it is recommended to leave the
  43. // following setting enabled.
  44. $Config['ForceSingleExtension'] = true ;
  45.  
  46. // Perform additional checks for image files
  47. // if set to true, validate image size (using getimagesize)
  48. $Config['SecureImageUploads'] = true;
  49.  
  50. // What the user can do with this connector
  51. $Config['ConfigAllowedCommands'] = array('QuickUpload', 'FileUpload', 'GetFolders', 'GetFoldersAndFiles', 'CreateFolder') ;
  52.  
  53. // Allowed Resource Types
  54. $Config['ConfigAllowedTypes'] = array('File', 'Image', 'Flash', 'Media') ;
  55.  
  56. // For security, HTML is allowed in the first Kb of data for files having the
  57. // following extensions only.
  58. $Config['HtmlExtensions'] = array("html", "htm", "xml", "xsd", "txt", "js") ;
  59.  
  60. /*
  61.  Configuration settings for each Resource Type
  62.  
  63.  - AllowedExtensions: the possible extensions that can be allowed. 
  64. If it is empty then any file type can be uploaded.
  65.  - DeniedExtensions: The extensions that won't be allowed. 
  66. If it is empty then no restrictions are done here.
  67.  
  68.  For a file to be uploaded it has to fulfill both the AllowedExtensions
  69.  and DeniedExtensions (that's it: not being denied) conditions.
  70.  
  71.  - FileTypesPath: the virtual folder relative to the document root where
  72. these resources will be located. 
  73. Attention: It must start and end with a slash: '/'
  74.  
  75.  - FileTypesAbsolutePath: the physical path to the above folder. It must be
  76. an absolute path. 
  77. If it's an empty string then it will be autocalculated.
  78. Useful if you are using a virtual directory, symbolic link or alias. 
  79. Examples: 'C:MySiteuserfiles' or '/root/mysite/userfiles/'.
  80. Attention: The above 'FileTypesPath' must point to the same directory.
  81. Attention: It must end with a slash: '/'
  82.  
  83. - QuickUploadPath: the virtual folder relative to the document root where
  84. these resources will be uploaded using the Upload tab in the resources 
  85. dialogs.
  86. Attention: It must start and end with a slash: '/'
  87.  
  88. - QuickUploadAbsolutePath: the physical path to the above folder. It must be
  89. an absolute path. 
  90. If it's an empty string then it will be autocalculated.
  91. Useful if you are using a virtual directory, symbolic link or alias. 
  92. Examples: 'C:MySiteuserfiles' or '/root/mysite/userfiles/'.
  93. Attention: The above 'QuickUploadPath' must point to the same directory.
  94. Attention: It must end with a slash: '/'
  95.  
  96.  NOTE: by default, QuickUploadPath and QuickUploadAbsolutePath point to 
  97.  "userfiles" directory to maintain backwards compatibility with older versions of FCKed
    itor. 
  98.  This is fine, but you in some cases you will be not able to browse uploaded fil
    es using file browser.
  99.  Example: if you click on "image button", select "Upload" tab and send image 
  100.  to the server, image will appear in FCKeditor correctly, but because it is plac
    ed 
  101.  directly in /userfiles/ directory, you'll be not able to see it in built-in file browser.
  102.  The more expected behaviour would be to send images directly to "image" subfolder.
  103.  To achieve that, simply change
  104.  $Config['QuickUploadPath']['Image']  = $Config['UserFilesPath'] ;
  105.  $Config['QuickUploadAbsolutePath']['Image']  = $Config['UserFilesAbsolutePath'] ;
  106. into:  
  107.  $Config['QuickUploadPath']['Image']  = $Config['FileTypesPath']['Image'] ;
  108.  $Config['QuickUploadAbsolutePath']['Image'] = $Config['FileTypesAbsolutePath']['Image'] ;  
  109.  
  110. */
  111.  
  112. $Config['AllowedExtensions']['File']  = array('7z', 'aiff', 'asf', 'avi', 'bmp', 'csv', 'doc', 'fla', 'flv', 'gif', 'gz', 'gzip', 'jpeg', 'jpg', 'mid', 'mov', 'mp3', 'mp4', 'mpc', 'mpeg', 'mpg', 'ods', 'odt', 'pdf', 'png', 'ppt', 'pxd', 'qt', 'ram', 'rar', 'rm', 'rmi', 'rmvb', 'rtf', 'sdc', 'sitd', 'swf', 'sxc', 'sxw', 'tar', 'tgz', 'tif', 'tiff', 'txt', 'vsd', 'wav', 'wma', 'wmv', 'xls', 'xml', 'zip') ;
  113. $Config['DeniedExtensions']['File'] = array() ;
  114. $Config['FileTypesPath']['File'] = $Config['UserFilesPath'] . '../../../../../../images/products/' ;
  115. $Config['FileTypesAbsolutePath']['File']= ($Config['UserFilesAbsolutePath'] == '') ? '' : $Config['UserFilesAbsolutePath'].'../../../../../../images/products/' ;
  116. $Config['QuickUploadPath']['File'] = $Config['UserFilesPath'] ;
  117. $Config['QuickUploadAbsolutePath']['File']= $Config['UserFilesAbsolutePath'] ;
  118.  
  119. $Config['AllowedExtensions']['Image']  = array('bmp','gif','jpeg','jpg','png') ;
  120. $Config['DeniedExtensions']['Image']  = array() ;
  121. $Config['FileTypesPath']['Image'] = $Config['UserFilesPath'] . '../../../../../../images/products/' ;
  122. $Config['FileTypesAbsolutePath']['Image']= ($Config['UserFilesAbsolutePath'] == '') ? '' : $Config['UserFilesAbsolutePath'].'../../../../../../images/products/' ;
  123. $Config['QuickUploadPath']['Image'] = $Config['UserFilesPath'] ;
  124. $Config['QuickUploadAbsolutePath']['Image']= $Config['UserFilesAbsolutePath'] ;
  125.  
  126. $Config['AllowedExtensions']['Flash']  = array('swf','flv') ;
  127. $Config['DeniedExtensions']['Flash']  = array() ;
  128. $Config['FileTypesPath']['Flash'] = $Config['UserFilesPath'] . '../../../../../../images/products/' ;
  129. $Config['FileTypesAbsolutePath']['Flash']= ($Config['UserFilesAbsolutePath'] == '') ? '' : $Config['UserFilesAbsolutePath'].'../../../../../../images/products/' ;
  130. $Config['QuickUploadPath']['Flash'] = $Config['UserFilesPath'] ;
  131. $Config['QuickUploadAbsolutePath']['Flash']= $Config['UserFilesAbsolutePath'] ;
  132.  
  133. $Config['AllowedExtensions']['Media']  = array('aiff', 'asf', 'avi', 'bmp', 'fla', 'flv', 'gif', 'jpeg', 'jpg', 'mid', 'mov', 'mp3', 'mp4', 'mpc', 'mpeg', 'mpg', 'png', 'qt', 'ram', 'rm', 'rmi', 'rmvb', 'swf', 'tif', 'tiff', 'wav', 'wma', 'wmv') ;
  134. $Config['DeniedExtensions']['Media']  = array() ;
  135. $Config['FileTypesPath']['Media'] = $Config['UserFilesPath'] . '../../../../../../images/products/' ;
  136. $Config['FileTypesAbsolutePath']['Media']= ($Config['UserFilesAbsolutePath'] == '') ? '' : $Config['UserFilesAbsolutePath'].'../../../../../../images/products/' ;
  137. $Config['QuickUploadPath']['Media'] = $Config['UserFilesPath'] ;
  138. $Config['QuickUploadAbsolutePath']['Media']= $Config['UserFilesAbsolutePath'] ;
  139.  
  140. ?>


O co tu chodzi?
arecki
Przeczytaj co tu jest napisane:
  1. <?php
  2. // SECURITY: You must explicitly enable this "connector". (Set it to "true").
  3. // WARNING: don't just set "$Config['Enabled'] = true ;", you must be sure that only 
  4. // authenticated users can access this file or use some kind of session checking.
  5. $Config['Enabled'] = false ;
  6. ?>
To jest wersja lo-fi g³ównej zawarto¶ci. Aby zobaczyæ pe³n± wersjê z wiêksz± zawarto¶ci±, obrazkami i formatowaniem proszê kliknij tutaj.
Invision Power Board © 2001-2025 Invision Power Services, Inc.