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 1mK6vH-0007FI-Lv for pgsql-general@arkaria.postgresql.org; Sat, 28 Aug 2021 22:35:36 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mK6vG-0004UT-CC for pgsql-general@arkaria.postgresql.org; Sat, 28 Aug 2021 22:35:34 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mK6vE-0004UL-OT for pgsql-general@lists.postgresql.org; Sat, 28 Aug 2021 22:35:34 +0000 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mK6v7-0007CS-Pc for pgsql-general@lists.postgresql.org; Sat, 28 Aug 2021 22:35:31 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id 56B4632008C0; Sat, 28 Aug 2021 18:35:23 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Sat, 28 Aug 2021 18:35:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:cc:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm3; bh=8 ALVMtzetpk8U72aMob9E8IxdhLKbko0H46OhKbOrkc=; b=CGnACHaIymhTURw3R FUlY4EdSai/DPdbmTOUg6a4qBZpGftqJkCNMzju3oBYVBBoTvOA5PO4mRNsHqpTq w3iFNkeZdehlX2Y3Z0vQKLO/fR9izpbgYh3TWHPuqUmjhrE/BI19B3a9MuXdf1Uo 1kTuiIWyuzuzOxgk9x4jPIkPQjD54Km5PkoJEk5bIBZcyLoceB+Mx/KpzvFeCnDh 1M6ik5K9gKzyJAJd6XP7ExC2nYESJaFNKH9MFIE14w+bWsDaF+L+xzaCCyORcM+o 9pdiD9sD5U5HJLUiK3Jk8WjmMtxUrSfbaPmwkiJ3qVyAhc9Sg6brgfwUT7nvOBue 0j0VA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=8ALVMtzetpk8U72aMob9E8IxdhLKbko0H46OhKbOr kc=; b=EDLd+I7ila6x5zeD8pRgQ2eV3aL7r/tXyNsQh42V/a44+XrLsAgbdMOCk ypnJctnvjSkqq2bDloFUDxQwMKd6Pw1I96q7Aa55bMwLJn1c0BFWWctRVOwiKKVd lPn5/VaQzOoPZ1cGwMHnFv+K+PVqlAPam/viq4uF7gXJB0800G29qPLCKVVkwK4n uzNhLvz+HiQla1oHB0Nhrnk+Xh/vY/GUy1GNekKCkic8FLGLhpwLUY2IsUNEZJk9 RcMCxJZBz/U81r3UrxOi44ENifo2WnXRgX7Oen0Cy2DVmrwJ6tPQy0lqV03dqeEM Xwp7WWDGnMm3s3UXc1AT7JZOZ6U6A== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrudduiedguddvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefuvfhfhffkffgfgggjtgfgsehtje ertddtfeejnecuhfhrohhmpeetughrihgrnhcumfhlrghvvghruceorggurhhirghnrdhk lhgrvhgvrhesrghklhgrvhgvrhdrtghomheqnecuggftrfgrthhtvghrnhepuddvkeetve eujeegveeuuefhffduvdfhheeggfduvdfggeekieelvdfgudelfedtnecuffhomhgrihhn pehphhhprdhnvghtnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilh hfrhhomheprggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 28 Aug 2021 18:35:21 -0400 (EDT) Subject: Re: use fopen unknown resource To: ourdiaspora Cc: "pgsql-general@lists.postgresql.org" References: From: Adrian Klaver Message-ID: <246d107b-b4be-6290-fe32-95697acbfb05@aklaver.com> Date: Sat, 28 Aug 2021 15:35:20 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 8/28/21 2:55 PM, ourdiaspora wrote: > > On Saturday, August 28th, 2021 at 5:52 PM, Adrian Klaver wrote: > >> >> You are asking the user to select a file, so there should be some sort >> >> of file reference at that point, correct? >> > > This is what causes confusion. If a user has a file named 'mydatafile.csv', why does the manual make reference to open 'test.csv'???: Because that is a 'dummy' file name for the purposes of illustrating what sort of information needs to be provided. Just substitute in whatever file name is actually being fetched in the production code. > > https://www.php.net/manual/en/function.fgetcsv.php > " > ... > if (($handle = fopen("test.csv", "r")) !== FALSE) { > ... > " > > > -- Adrian Klaver adrian.klaver@aklaver.com