How does require transmit data?

Source: Internet
Author: User
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 ..

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.