Require how to pass data

Source: Internet
Author: User
There are 2 pages a page a.php and b files functions.php
A is the submission page
b is the Require file

How to upload the Pripath value from page A to the functions.php page




A page
 
    
 
  






b file functions.php

Optimize the $ztid= $cr [' Ztid ']; $ztid 22= ' mingxing/****a The value of the page to the front of the mingxing/to the star good is not '; $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 by '. $addorder. $limit; $totalquery = "SELECT count (*) as total from {$dbtbpre}enewsztinfo where". $ Yhadd. " Cid= ' $classid ';//Statistics $doclasspath=returnsaveztpath ($ztid, 0); $dopath =ecms_path. $ztid 22. " /"; if (empty ($class _zr[$ztid][zturl]) {$dolink = $public _r[newsurl]. $ztid 22." /";} else{$dolink = $class _zr[$ztid][zturl]. " /";


Reply to discussion (solution)

Use session
Put, take

First you determine what value is received, and then use theIt's also possible.

Require ('.. /.. /class/functions.php ');
$pripath = (int) $_post[' Pripath '];

Change the order of the two sentences so that functions.php can use the $pripath variable.

Require ('.. /.. /class/functions.php ');
$pripath = (int) $_post[' Pripath '];

Change the order of the two sentences so that functions.php can use the $pripath variable.



This is a positive solution.
You can also use $_post[' Pripath ' on page b; Get value

It's all require. Also use the pass parameter, #4正解

#4正解:

  • 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.