Encountered PHP variable assignment strange.

Source: Internet
Author: User
Encountered PHP variable assignment strange .......
The strange things that happened when I modified the program today.
I'm going to assign a direct value.
$swfpath = "f:/comsenzexp/wwwroot/docs/2012/09/10/";
$pdfpath = "f:/comsenzexp/wwwroot/filestores/2012/09/10/";
This allows the program to run
But when I change the variables above, the program can't run.
$swfpath =$_server[document_root]. " /docs/". $file [' File_store_path '];
$pdfpath =$_server[document_root]. " /". $settings [' File_path ']." /". $file [' File_store_path '];
echo out of the value exactly the same, ask what this is caused by ....
Because the error cannot be displayed, so come to help

Or this program, $page =$_get[' page '], the program is normal, but the direct assignment is not as $page= "[*,0],8"; Although they echo out the same value, it's a ghost ...

This program is flexpaper PHP demo program, I want to embed him into my program, in the middle of such a few depressed problems


------Solution--------------------
1. $_server[document_root], because the key value is not quoted to tell PHP that this is a string, will produce a notice level of error, may throw after the header () function error, resulting in a warning level of error. If the error cannot be displayed, PHP will terminate itself
2. $page =$_get[' page '], the program is normal, but the direct assignment is not as $page= "[*,0],8";
I don't know what you're saying, what's the situation?
------Solution--------------------
Var_dump ("f:/comsenzexp/wwwroot/docs/2012/09/10/" = = $_server[document_root]. " /docs/". $file [' File_store_path ']);

------Solution--------------------
Add two lines to the program header and see what the error is.
PHP Code
  • Related Article

    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.