Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mK1rd-0006ap-Sw for pgsql-general@arkaria.postgresql.org; Sat, 28 Aug 2021 17:11:29 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mK1rc-0007D8-JB for pgsql-general@arkaria.postgresql.org; Sat, 28 Aug 2021 17:11:28 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mK1rc-0007D0-A8 for pgsql-general@lists.postgresql.org; Sat, 28 Aug 2021 17:11:28 +0000 Received: from mail.hjp.at ([212.17.106.138] helo=rorschach.hjp.at) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mK1rY-0001wF-R9 for pgsql-general@lists.postgresql.org; Sat, 28 Aug 2021 17:11:27 +0000 Received: by rorschach.hjp.at (Postfix, from userid 1000) id 61C01544C; Sat, 28 Aug 2021 19:11:23 +0200 (CEST) Date: Sat, 28 Aug 2021 19:11:23 +0200 From: "Peter J. Holzer" To: pgsql-general@lists.postgresql.org Subject: Re: use fopen unknown resource Message-ID: <20210828171123.GA25387@hjp.at> Mail-Followup-To: pgsql-general@lists.postgresql.org References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="BOKacYhQ+x31HxR3" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --BOKacYhQ+x31HxR3 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2021-08-28 09:52:45 -0700, Adrian Klaver wrote: > On 8/27/21 3:50 PM, ourdiaspora wrote: > > On Friday, August 27th, 2021 at 11:10 PM, Adrian Klaver wrote: > >=20 > > > https://www.php.net/manual/en/pdo.pgsqlcopyfromfile.php > > >=20 > >=20 > > " > > public PDO::pgsqlCopyFromFile( > > string $table_name, > > string $filename, > > " > >=20 > > Sorry but do not understand; the line does not explain what to write in= the php file. >=20 > I'm not a PHP programmer, but I'm going to say it is filename as described > here: The use of PHP suggests that this is a web application. So most likely the user is supposed to upload the file via an HTML form. I would suggest to the OP to learn how to process file uploads in PHP. Once they've figured that out it will probably be clear what file name to use. hp --=20 _ | Peter J. Holzer | Story must make more sense than reality. |_|_) | | | | | hjp@hjp.at | -- Charles Stross, "Creative writing __/ | http://www.hjp.at/ | challenge!" --BOKacYhQ+x31HxR3 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEETtJbRjyPwVTYGJ5k8g5IURL+KF0FAmEqbjYACgkQ8g5IURL+ KF2Utw/9FSEj3+FyAhKTmLoPSFcHm7kbYRaEi/44OQa10yFK6PilLh6Eg64NJDwi L3KAE7lqSmUNPDr1l99vMLObDzLG8KWZo3e4MM/wqHBDCugCDPahV2RQ7czLYbH5 +FFs86BTm5JVYY6rJJw8s9uX5Qs4sJycK661pdsA6T+zkHbFFd9y/LdojjzC69UU VEP2k75pD4frNstUwKjIQoHW3xFMjeAsqtC8FWORwiQPw7PU/RXNT73jFBW0Zp+U fe4dEMcWI2W3lYYoQYI9dF6B2H6ibUAjJtY4yrtUbhomPAe/9iycASRIpYrQeCmI McSDE8EpKdXJxDPHAglc4wOGCaLfwtKfZ+Z2VRr/Lq8Gm6GPn/XMngTk420XTQz3 xBJHZD7BvnKUPVIfQMuMusTNQxlH1Z7ycGv9t1KPDGqH+sHmZw+uKNM85yIw69le ZKURdncRPAkhDMgoj8R1JmjGWpsczHJ+2BlJ4AAL+pQjQqERji6ETyLnzDVDPtQq aoNr7TJX0uvD9XTqAp0IAPdZhwPVwRlipkjPfyeFKxUsOV2FANTVBYrsFcq7jBF9 nN4D0O3Hv+urd1lwHJDc9yvEko2not581ww8GU4hhgdZffME39Tgl5R9/lUenVyP LyXzNpLQ8rA4kVozvyKxmcJYrLJxzuH6FupSZEG0utbSoNGztps= =CNZX -----END PGP SIGNATURE----- --BOKacYhQ+x31HxR3--