本文整理自网络,侵删。
\include\inc_bookfunctions.php
---------------------------------------------------
……
代码如下:
function WriteBookText($cid,$body)
{<span id="more-1944"></span>
global $cfg_cmspath,$cfg_basedir;
$ipath = $cfg_cmspath."/data/textdata";
$tpath = ceil($cid/5000);
if(!is_dir($cfg_basedir.$ipath)) MkdirAll($cfg_basedir.$ipath,$GLOBALS['cfg_dir_purview']);
if(!is_dir($cfg_basedir.$ipath.'/'.$tpath)) MkdirAll($cfg_basedir.$ipath.'/'.$tpath,$GLOBALS['cfg_dir_purview']);
$bookfile = $cfg_basedir.$ipath."/{$tpath}/bk{$cid}.php";
$body = "<"."?php\r\n".$body."\r\n?".">";
@$fp = fopen($bookfile,'w');
@flock($fp);
@fwrite($fp,$body);
@fclose($fp);
<div id="qhide_185676" class="qt" style="display: block;">}
</div>
……
—————————————————
\member\story_add_content_action.php
—————————————————
……
function WriteBookText($cid,$body)
{<span id="more-1944"></span>
global $cfg_cmspath,$cfg_basedir;
$ipath = $cfg_cmspath."/data/textdata";
$tpath = ceil($cid/5000);
if(!is_dir($cfg_basedir.$ipath)) MkdirAll($cfg_basedir.$ipath,$GLOBALS['cfg_dir_purview']);
if(!is_dir($cfg_basedir.$ipath.'/'.$tpath)) MkdirAll($cfg_basedir.$ipath.'/'.$tpath,$GLOBALS['cfg_dir_purview']);
$bookfile = $cfg_basedir.$ipath."/{$tpath}/bk{$cid}.php";
$body = "<"."?php\r\n".$body."\r\n?".">";
@$fp = fopen($bookfile,'w');
@flock($fp);
@fwrite($fp,$body);
@fclose($fp);
<div id="qhide_185676" class="qt" style="display: block;">}
</div>
……
—————————————————
\member\story_add_content_action.php
—————————————————
……
代码如下:
WriteBookText($arcID,addslashes($body));
……
—————————————————
找了个好看的站测试了一下
WriteBookText($arcID,addslashes($body));
……
—————————————————
找了个好看的站测试了一下
标签:织梦DedeCMS
相关阅读 >>
dedecms v5.6升级到dedecms v5.7 sp1 最新教程(图文教程)
浅析dedecms gbk版安装sphinx全文索引无法查询无结果的解决方法
详解dedecms织梦远程图片本地化https链接图片无法本地化怎么解决
更多相关阅读请进入《织梦DedeCMS》频道 >>
相关推荐
评论
管理员已关闭评论功能...
- 欢迎访问木庄网络博客
- 可复制:代码框内的文字。
- 方法:Ctrl+C。