求问下discuz3.2版本,写入数据库的文件是不是forum_post.php
主要是哪一段?
是不是这一段 ,但看着不像啊:
$extra = !empty($_GET['extra']) ? rawurlencode($_GET['extra']) : '';$notifycheck = empty($emailnotify) ? '' : 'checked="checked"';$stickcheck = empty($sticktopic) ? '' : 'checked="checked"';$digestcheck = empty($addtodigest) ? '' : 'checked="checked"';$subject = isset($_GET['subject']) ? dhtmlspecialchars(censor(trim($_GET['subject']))) : '';$subject = !empty($subject) ? str_replace("\t", ' ', $subject) : $subject;$message = isset($_GET['message']) ? censor($_GET['message']) : '';$polloptions = isset($polloptions) ? censor(trim($polloptions)) : '';$readperm = isset($_GET['readperm']) ? intval($_GET['readperm']) : 0;$price = isset($_GET['price']) ? intval($_GET['price']) : 0;
回复讨论(解决方案)
/*以发表主题为例1、点击发表,进入到\source\module\forum\forum_post.php,进行插入前的操作,如审核2、在345行左右,有一句:require_once libfile('post/newthread', 'include');进入发表主题的处理页面(\source\include\post\post_newthread.php)3、在409行左右,有一句:$tid = C::t('forum_thread')->insert($newthread, true);$newthread就是要插入的主题数据,就在这句上面4、在571行左右,有一句:$pid = insertpost(array(这是插入主题的详细信息*/
为了点积分 头像换了居然说未完成
/*以发表主题为例1、点击发表,进入到\source\module\forum\forum_post.php,进行插入前的操作,如审核2、在345行左右,有一句:require_once libfile('post/newthread', 'include');进入发表主题的处理页面(\source\include\post\post_newthread.php)3、在409行左右,有一句:$tid = C::t('forum_thread')->insert($newthread, true);$newthread就是要插入的主题数据,就在这句上面4、在571行左右,有一句:$pid = insertpost(array(这是插入主题的详细信息*/额,我用的是3.2版本的 在这个文件并没有你说得这个。可能又移动到什么地方去了。
2、在345行左右,有一句:require_once libfile('post/newthread', 'include');
进入发表主题的处理页面(\source\include\post\post_newthread.php)
这一步,是有的,但是到了第三步source\include\post\post_newthread.php就断了。这个文件应该已经改动,查找下libfile,也没有找到相关操作。
我去找了下2.5版的,确实在409行有这个。
但3.2版本就没有了,麻烦老大指点迷津。
X3.2变化貌似挺大的
还是在\source\include\post\post_newthread.php
下面一句就是插入
$return = $modthread->newthread($params);
X3.2变化貌似挺大的
还是在\source\include\post\post_newthread.php
下面一句就是插入
$return = $modthread->newthread($params);
我原先也认为是这个,但怎么也获取不了值。
我再forum_thread表新增一个about字段。在mod程序的forum_post.php获取$about= getgpc('about');
然后再post_newthread.php 获取:$params['about']=$about
结果数据库字段没有得到值。求问怎么处理?
那要看你是否真的获取到了,用
file_put_contents('/home/wwwroot/default/log.txt',var_export($_REQUEST,true).PHP_EOL,FILE_APPEND);
打印到一个文件,打开看一下
那要看你是否真的获取到了,用
file_put_contents('/home/wwwroot/default/log.txt',var_export($_REQUEST,true).PHP_EOL,FILE_APPEND);
打印到一个文件,打开看一下
主要是不知道这个写法对不对啊
在 source\class\model 目录下的两个文件里面
/*以发表主题为例1、点击发表,进入到\source\module\forum\forum_post.php,进行插入前的操作,如审核2、在345行左右,有一句:require_once libfile('post/newthread', 'include');进入发表主题的处理页面(\source\include\post\post_newthread.php)3、在409行左右,有一句:$tid = C::t('forum_thread')->insert($newthread, true);$newthread就是要插入的主题数据,就在这句上面4、在571行左右,有一句:$pid = insertpost(array(这是插入主题的详细信息*/
给分给错了,请到http://bbs.csdn.net/topics/390962647领取分数。

PHPsessionstrackuserdataacrossmultiplepagerequestsusingauniqueIDstoredinacookie.Here'showtomanagethemeffectively:1)Startasessionwithsession_start()andstoredatain$_SESSION.2)RegeneratethesessionIDafterloginwithsession_regenerate_id(true)topreventsessi

In PHP, iterating through session data can be achieved through the following steps: 1. Start the session using session_start(). 2. Iterate through foreach loop through all key-value pairs in the $_SESSION array. 3. When processing complex data structures, use is_array() or is_object() functions and use print_r() to output detailed information. 4. When optimizing traversal, paging can be used to avoid processing large amounts of data at one time. This will help you manage and use PHP session data more efficiently in your actual project.

The session realizes user authentication through the server-side state management mechanism. 1) Session creation and generation of unique IDs, 2) IDs are passed through cookies, 3) Server stores and accesses session data through IDs, 4) User authentication and status management are realized, improving application security and user experience.

Tostoreauser'snameinaPHPsession,startthesessionwithsession_start(),thenassignthenameto$_SESSION['username'].1)Usesession_start()toinitializethesession.2)Assigntheuser'snameto$_SESSION['username'].Thisallowsyoutoaccessthenameacrossmultiplepages,enhanc

Reasons for PHPSession failure include configuration errors, cookie issues, and session expiration. 1. Configuration error: Check and set the correct session.save_path. 2.Cookie problem: Make sure the cookie is set correctly. 3.Session expires: Adjust session.gc_maxlifetime value to extend session time.

Methods to debug session problems in PHP include: 1. Check whether the session is started correctly; 2. Verify the delivery of the session ID; 3. Check the storage and reading of session data; 4. Check the server configuration. By outputting session ID and data, viewing session file content, etc., you can effectively diagnose and solve session-related problems.

Multiple calls to session_start() will result in warning messages and possible data overwrites. 1) PHP will issue a warning, prompting that the session has been started. 2) It may cause unexpected overwriting of session data. 3) Use session_status() to check the session status to avoid repeated calls.

Configuring the session lifecycle in PHP can be achieved by setting session.gc_maxlifetime and session.cookie_lifetime. 1) session.gc_maxlifetime controls the survival time of server-side session data, 2) session.cookie_lifetime controls the life cycle of client cookies. When set to 0, the cookie expires when the browser is closed.


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

Atom editor mac version download
The most popular open source editor

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function

SublimeText3 English version
Recommended: Win version, supports code prompts!

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.
