Questions about accessing the postgres database on the php page-php Tutorial

Source: Internet
Author: User
Tags postgres database
Php page access to IPVs database problems the local machine is equipped with php, apache, postgres database & nbsp; I want to insert the data in the page from the browser php page to the local database, the code I wrote must be correct, but it means that the data cannot be inserted into the database (during the runtime, he only runs the code before the database code is connected, and then does not leave, and no error is reported, but the code is absolutely correct, as shown in the following code:) it seems that there is no access permission, but the permissions of users who write on the Internet are too messy. I am a beginner and cannot understand the problem of accessing the postgres database on the php page.
Php, apache, and IPVs databases are installed on the machine.
I want to insert the data on the page to the local database on the php page of the browser. the code I write is correct, but it cannot be inserted into the database (during runtime, he only runs the code before the code is connected to the database, and does not return any errors. but the code is absolutely correct, as shown in the following code:), it seems that he has no access permission, however, the permissions of users written on the Internet are too messy. I am a beginner and cannot understand it.
Can you write down the specific file configurations and how to configure them to insert the page data to the database? the more detailed, the better. I will return the useful information to the database!




Echo & quot; 222 & quot ";

[Email protected] _ connect ("host = localhost user = S password = S dbname = dam port = 5432") or die ("ERROR ");

Echo "aaaaa ";
?>
The browser displays only 222, but not aaaaa. But the aaaaa can be displayed after the database connection code is deregistered. why?


------ Solution --------------------
[Email protected] to see what the error is.
------ Solution --------------------
In this case, you need to reinstall php and set it according to the correct configuration method, especially by specifying the correct S database,
Will it fail to find the library file?

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.