zoukankan      html  css  js  c++  java
  • ckfinder+ckeditor配置经验

    1,单独使用ckfinder

    <div> 
    <script type="text/javascript" src="../ckfinder/ckfinder.js"></script> 
    <script type="text/javascript"> 
    function BrowseServer(inputId) 

    var finder = new CKFinder() ; 
    finder.basePath = '../ckfinder/'; //导入CKFinder的路径 
    finder.selectActionFunction = SetFileField; //设置文件被选中时的函数 
    finder.selectActionData = inputId; //接收地址的input ID 
    finder.popup() ; 

    //文件选中时执行 
    function SetFileField(fileUrl,data) 

    document.getElementById(data["selectActionData"]).value = fileUrl ; 

    </script> 
    <p> 
    <asp:TextBox ID="txtImgPath" runat="server"></asp:TextBox> 
    <input type="button" value=" 浏 览 " onclick="BrowseServer('<%=txtImgPath.ID %>');" /> 
    </p> 
    </div> 

    2,ckfinder的php配置在config.php中

    $phpSelf = $_SERVER["PHP_SELF"];
    $serverUrl=substr($phpSelf, 0, stripos($phpSelf, 'public'));

    $uid = $_COOKIE['Tudou_uid'];
    if(empty($uid))return;

    $baseUrl = $serverUrl.'Upload/'.$uid."/";
    //$baseUrl = $serverUrl.'Upload/test/';

    if(!is_dir($baseUrl)){
        $res=mkdir($baseUrl,0777,true);
        if (!$res){
            return;
        }
    }
  • 相关阅读:
    python基础 列表推导式
    信息时代的个人知识管理探微
    quaternion 四元数
    Display Lists在内存中的形式
    有关四元数 我所理解的四元数
    ogre scene_blend 透明
    ogre RenderTexture alpha rtt透明续
    四元数
    Ogre overlay实现帧动画
    贴图消失
  • 原文地址:https://www.cnblogs.com/bluestear/p/11442466.html
Copyright © 2011-2022 走看看