About the code of the Ucenter communication process! CSDN great Gods! Admiring! Please give me more advice!

Source: Internet
Author: User
Tags testlink
Debugging Ucenter in the/control/admin/app.php encountered such a piece of code
if ($app [' Extra '] [' AppPath '] && @include $app [' Extra '] [' AppPath ']. /api/'. $app [' Apifilename '])
{
Code
}
Is this if the include file is the result of execution or the file itself, or simply return a ture or false?
The include comes in a. php file.
Split Line----------------------------------------------------------------------------------------------------------------
Run the Onping function in the following file
 
  Get_app_by_appid ($appid), $status = ", if ($app [' Extra '] [' AppPath '] && @include $app [' Extra '] [' AppPath ']. /api/'. $app [' Apifilename ']) {echo ' in if= '. $app [' Extra '] [' AppPath ']. /api/'. $app [' Apifilename ']; $uc _note = new Uc_note (); $status = $uc _note->test ($note [' GetData '], $note [' PostData ']) ;} else {echo ' in Else '; $this->load (' note '); $url = $_env[' Note ']->get_url_code (' Test ', ' ', $appid); $status = $_env[' App ']->test_api ($url, $IP);} if ($status = = ' 1 ') {echo ' document.getElementById (\ ' Status_ '. $appid. ' \ '). InnerHTML = "'. $this->lang[' App_connent_ok ']. '"; Testlink (); ';} else {echo ' document.getElementById (\ ' Status_ '. $appid. ' \ '). InnerHTML = "'. $this->lang[' App_connent_false ']. '"; Testlink (); ';}}? >


Include $app [' Extra '] [' AppPath ']. /api/'. $app [' apifilename '] This file is the uc.php file in the other directory, the front code is as follows! This file is UTF8 version of the HDwiki5.1 comes with!

 3600) {exit (' authracation has expiried ');}


So why did you output a ' Invalid Request? Is this the result of the output?


Reply to discussion (solution)

For @include $app [' Extra '] [' AppPath ']. /api/'. $app [' Apifilename ']
When the file $app [' Extra '] [' AppPath ']. /api/'. $app [' apifilename '] when not present, against false
Returns 1 when present
This writing is absolutely no problem!

If there is a problem with your program, please find the reason in other places

For @include $app [' Extra '] [' AppPath ']. /api/'. $app [' Apifilename ']
When the file $app [' Extra '] [' AppPath ']. /api/'. $app [' apifilename '] when not present, against false
Returns 1 when present
This writing is absolutely no problem!

If there is a problem with your program, please find the reason in other places



Excuse me, what is the difference between such usage and the function of file_exists? Does the include content affect local programs? Or is the mere interpretation of the file present?

There must be content in the include, and you can see a lot of definitions from the clips you post?
You can certainly determine the existence of a file before you include
But isn't it simple to write? At least compile the device to analyze a statement less?

Problem found.
It's a 301 jump question.
Changed the host space the original independent IP No!
301 Jump aspect may be a bit of a problem!
Thank you, great God!

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