Today, we migrated a dream station from the original virtual machine to the local machine. After the deployment is complete, we found that we logged on to the white screen in the background and opened the error prompt. No error prompt was displayed. It is suspected that the wampserver has a problem. It is reinstalled and reconfigured. After the data is imported, the problem remains the same. No way. You have to reinstall the Zhimeng and then modify the configuration file and copy the template ······
Log on to the background, click the File Manager, and an error message is displayed: Fatal error: Call to a member function read () on a non-object in D: Mysitelwhcmslwhtempletsfile_manage_main.htm on line 94, the details are shown in the following figure:
Next, go to the article Publishing page and click "intra-site selection" in the thumbnail location. The error Fatal error: Call to a member function read () also appears () on a non-object in D: mysitelwhcms?dedialogselect_images.php on line 149, see the following figure:
Open the program source code, the error is as follows: www.111cn.net
I seem to understand something,$ Dh
The specified directory does not exist, causing program execution errors. Why not! There is only one possibility, that is, the program configuration item has a problem. Before looking for a problem, I returned to the first error page. It looked good and seemed to have found something! See the following figure (note the URL in the address bar)
Well, this shows that my previous conjecture is correct. I 'd like to explain that Zhimeng is installed under the root directory of the website.Cms
Directory, but the parameters passed aboveActivepath
For/cms/uploads, that is to say, there is an additional layer. To find out the extra layer, I have read it specially.Include
DirectoryCommon. inc. php
File (you can output variables through echo), and solve the above problem by changing the background configuration items. See the figure below:
Below I post someCommon. inc. php
Source code to describe the above configuration:
- // Attachment Directory
- $ Pai_medias_dir = $ pai_cmspath. $ pai_medias_dir;
- $ Pai_mediasurl = $ pai_mainsite. $ pai_medias_dir;
Because the website is installed in a subdirectory$ Export _cmspath =/cms
.
Summary
Like many people, my first reaction was to go to Baidu and Google, but I was disappointed with the result because the solution provided by many people was to change the dede source code, in my opinion, this is the work of breaking the east wall to make up the west wall (which was originally wrong by myself and changing the program, the problem can only be solved temporarily without finding the cause of the problem and the correct solution, so it is not advisable.