Issues related to page handling of data submitted by form

Source: Internet
Author: User
Form data submission page processing problem form data submission processing newUser. php is a subpage under the framework of the home page. when submitting a form, the adduser page is used. php & lt; formid & quot; Addusers & quot; name & quot; Addusers & quot; method & quot; post & quot; action & quot ;. how to handle the page handling of data submitted by connadform
Submission and processing of form data

NewUser. php is a subpage under the framework of the home page. when submitting a form, the page adduser. php is used.


Adduser. php uses functions in func. php.
Include "func. php ";
// Include "./func. php ";
Both of these methods will cause the operation to fail:
HTTP 500.0-Internal Server Error

Even if you block all the statements that reference functions in func. php, retaining only this include statement will make an error.
However, you only need to block this sentence and execute other operations ......
It must be a question of this sentence.

Find a solution.

The related file path structure is as follows:

Main Directory: test/
Pubmain. php
NewUser. php
Conn/adduser. php
Conn/func. php

Is it a problem I set?

------ Solution --------------------
Looking at adduser. php and func. php are both in the same directory, there should be no error.
However, you have not enabled the error prompt, so you cannot deny that there are no other problems. For example, a syntax error in func. php causes a fatal error.
Therefore, modify php. ini display_errors = On to restart the server and check the error message.
------ Solution --------------------
I do...
I have already said the last sentence.
Alternatively, you can add the following code before the code: error_reporting (E_ALL | E_NOTICE );
------ Solution --------------------
Discussion

Reference:

Looking at adduser. php and func. php are both in the same directory, there should be no error.
However, you have not enabled the error prompt, so you cannot deny that there are no other problems. For example, a syntax error in func. php causes a fatal error.
Therefore, modify php. ini display_errors = On to restart the server and check the error message.

Thank you for your reply. how can I enable the error message?

------ Solution --------------------
It is best to include files in PHP:
Include (dirname (_ FILE _). "/initialize. php ");
Include (dirname (_ FILE _). "/../mode/mysql_mode_class.php ");
Because the inclusion in php is based on the current execution page.

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.