eval function, a string escape, great pain, please the hero to help

Source: Internet
Author: User
eval function, a string escape, extremely painful, please the hero to help
The following code, error-correct, can be correctly output an href when clicked can pop up 111
 
  
$TB = ";
$wcHead = ' $tb. =\ ';
$wcTable = ";
$wcFoot = ' \ '; ';

$t = ' 1111111fdddd ';
$wcTable = ' test ';//---------Note here
$WC = $wcHead. $wcTable. $wcFoot;
eval ($WC);

Echo $TB;

However, what I want to achieve is: a Click, then pops up $t= ' 1111111fdddd, the value of this variable, how to implement?? The following are the wrong methods:
$wcTable = 'Test';
$wcTable = 'Test';


------Solution--------------------
$wcTable =<<
 <>
Test
html

------Solution--------------------
 
  
$TB = ";
$wcHead = ' $tb. =\ ';
$wcTable = ";
$wcFoot = ' \ '; ';

$t = ' 1111111fdddd ';
$wcTable = ' test ';//---------Note here
$WC = $wcHead. $wcTable. $wcFoot;
eval ($WC);

Echo $TB;

------Solution--------------------
Reference:
reference: PHP code?123$wctable=<<<>testhtml;
No, it's been resolved.

Test

Where not? Pop up 1111111fdddd isn't that what you want?
  • 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.