eWebEditor首页 >> eWebEditor国产化专用版 V2.2 >> 开发手册 >> 高级Session安全接口

3.8.3 接口示例

ASP代码:

<%
Session("eWebEditor_news_FileSize") = "100"          '
限制每个上传文件最大100KB
Session("eWebEditor_news_FileBrowse") = "1"          '
允许服务器端文件浏览
Session("eWebEditor_news_SpaceSize") = "100"         '限制上传空间最大允许100MB
Session("eWebEditor_news_SpacePath") = "d:\user1\"   '空间限制路径,此项不设则取上传文件夹
Session("eWebEditor_news_PathMode") = "1"            '使用绝对根路径
Session("eWebEditor_news_PathUpload") = "../uploads/"     '上传路径
Session("eWebEditor_news_PathCusDir") = "user1/"          '实际传到../uploads/user1/
……
%>

<iframe src="ewebeditor.htm?id=content1&skey=news"></iframe>

 

PHP代码:

<?php
$_SESSION["eWebEditor_news_FileSize"] = "100";        //
限制每个上传文件最大100KB
$_SESSION["eWebEditor_news_FileBrowse"] = "1";        //
允许服务器端文件浏览
$_SESSION["eWebEditor_news_SpaceSize"] = "100";       //限制上传空间最大允许100MB
$_SESSION["eWebEditor_news_SpacePath"] = "d:\user1\";  //空间限制路径,此项不设则取上传文件夹
$_SESSION["eWebEditor_news_PathMode"] = "1";          //使用绝对根路径
$_SESSION["eWebEditor_news_PathUpload"] = "../uploads/";     //上传路径
$_SESSION["eWebEditor_news_PathCusDir"] = "user1/";          //实际传到../uploads/user1/
……
?>

<iframe src="ewebeditor.htm?id=content1&skey=news"></iframe>

 

JSP代码:

<%
m_session.setAttribute("eWebEditor_news_FileSize", "100");   //
限制每个上传文件最大100KB
m_session.setAttribute("eWebEditor_news_FileBrowse", "1");   //
允许服务器端文件浏览
m_session.setAttribute("eWebEditor_news_SpaceSize, "100");   //限制上传空间最大允许100MB
m_session.setAttribute("eWebEditor_news_SpacePath", "d:\\user1\\");    //空间限制路径,此项不设则取上传文件夹
m_session.setAttribute("eWebEditor_news_PathMode", "1");            //使用绝对根路径
m_session.setAttribute("eWebEditor_news_PathUpload", "../uploads/");     //上传路径
m_session.setAttribute("eWebEditor_news_PathCusDir", "user1/");  //实际传到../uploads/user1/
……
%>

<iframe src="ewebeditor.htm?id=content1&skey=news"></iframe>