The php variable assignment is strange ............ what happened when I modified the program today. first, assign $ swfpath & quot; F: ComsenzEXPwwwrootdocs20120910 & quot; $ pdfpath & quot; F: ComsenzEXPwwwrootfilestores20120910 & quot ;; in this way, the program can run the php variable assignment strange thing ............
What happened when I modified the program today.
Assign a value first.
$ Swfpath = "F:/ComsenzEXP/wwwroot/docs/2012/09/10 /";
$ Pdfpath = "F:/ComsenzEXP/wwwroot/filestores/2012/09/10 /";
In this way, the program can run
But after I change the above variable to this, the program will not be able to run.
$ Swfpath = $ _ SERVER [DOCUMENT_ROOT]. "/docs/". $ file ['File _ store_path '];
$ Pdfpath = $ _ SERVER [DOCUMENT_ROOT]. "/". $ settings ['File _ path']. "/". $ file ['File _ store_path '];
The values returned by echo are exactly the same. what is the cause ....
For help
Or this program, $ page = $ _ GET ['Page']; the program is normal, but it cannot be assigned directly, for example, $ page = "[*, 0], 8 "; even though their echo values are exactly the same, it's just a ghost .......
This program is the FlexPaper php demo program. I want to embed it into my program and encounter such depressing problems.
------ Solution --------------------
1. $ _ SERVER [DOCUMENT_ROOT], because the key value is not enclosed in quotation marks to tell PHP that this is a string, a notice-level error will be generated and the subsequent header () may be thrown () A function error occurs, resulting in a warning-level error. PHP will terminate itself if an error cannot be displayed.
2. $ page = $ _ GET ['Page']; the program is normal, but it cannot be assigned directly, for example, $ page = "[*, 0], 8 ";
I don't know what the situation is?
------ Solution --------------------
Var_dump ("F:/ComsenzEXP/wwwroot/docs/2012/09/10/" ==$ _ SERVER [DOCUMENT_ROOT]. "/docs /". $ file ['File _ store_path ']);
------ Solution --------------------
Add two lines in the program header to check the error message.
PHP code
ini_set('display_errors', 'On');error_reporting(E_ALL);