How does require transmit data? there are two pages, page A. php and file B functions. php.
A is the submission page
B is the require file.
How to pass the pripath value on page A to the functions. php page
Page
File B functions. php
// Optimize $ ztid = $ cr ['ztid']; $ ztid22 = 'mingxing/*** the value on the page is uploaded to the mingxing/desired star here '; $ yhid = $ class_zr [$ ztid] [yhid]; if ($ yhid) {$ yhadd = ReturnYhSql ($ yhid, $ yhvar, 1 );} $ query = "select ztid, cid, classid, id, isgood from {$ dbtbpre} enewsztinfo where ". $ yhadd. "cid = '$ classid 'Order ". $ addorder. $ limit; $ totalquery = "select count (*) as total from {$ dbtbpre} enewsztinfo where ". $ yhadd. "cid = '$ classid'"; // statistics $ doclasspath = ReturnSaveZtPath ($ ztid, 0); $ dopath = ECMS_PATH. $ ztid22. "/"; if (empty ($ class_zr [$ ztid] [zturl]) {$ dolink = $ public_r [newsurl]. $ ztid22. "/";} else {$ dolink = $ class_zr [$ ztid] [zturl]. "/";
Reply to discussion (solution)
Use session
Put, take
First, you determine what value is received, and then useYes, too.
Require ('../class/functions. php ');
$ Pripath = (int) $ _ POST ['pripath'];
Change the order of the two statements so that the variable $ pripath can be used in functions. php.
Require ('../class/functions. php ');
$ Pripath = (int) $ _ POST ['pripath'];
Change the order of the two statements so that the variable $ pripath can be used in functions. php.
This is a positive solution.
You can also use $ _ POST ['pripath']; on page B to obtain the value.
Both require and pass parameters, #4 positive solution
#4 positive solution ..