Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:78096 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 4983 invoked from network); 15 Oct 2014 15:05:05 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Oct 2014 15:05:05 -0000 Authentication-Results: pb1.pair.com smtp.mail=park.framework@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=park.framework@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.173 as permitted sender) X-PHP-List-Original-Sender: park.framework@gmail.com X-Host-Fingerprint: 209.85.214.173 mail-ob0-f173.google.com Received: from [209.85.214.173] ([209.85.214.173:36559] helo=mail-ob0-f173.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id CE/36-03764-02D8E345 for ; Wed, 15 Oct 2014 11:05:04 -0400 Received: by mail-ob0-f173.google.com with SMTP id wp4so1177141obc.32 for ; Wed, 15 Oct 2014 08:05:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=qVQBssEzcPpz9xZ5AEajwrN8ijKKv1DvDWF9+RoD1ZE=; b=J5LdlGz+LBwWUVraUlKVOKp0RAkzdJMlCYjuhFRM73D9Q7aiqVXRF1Ky4hyzI60XsR fviup9HkgeJa5+57r240vMB5O5+YXDYeK4SBcm/HPDv1oNiz4g9le0+CH05sVUUkXGZC QlydmNhB3VV9BY+vrrX+BSDhf4D1YgjiFXluL9OH+DixCSeWL0y6qXqCc+Z4vHzZahsF eUvMxRL/dymnHhzqTMD0hhMyZaxaR/DPLLlCCl+iSdvTY5CzYq7muH8TzmKIZ97mwNiv Ea6NiVWzmjAjTEyt9w2Bl5ikHt9e1mVD0uDKPfMCVe+Tuv1FEzl3R3u7U99q6xLdXP95 KFFA== MIME-Version: 1.0 X-Received: by 10.182.171.1 with SMTP id aq1mr2175962obc.64.1413385501612; Wed, 15 Oct 2014 08:05:01 -0700 (PDT) Received: by 10.76.23.37 with HTTP; Wed, 15 Oct 2014 08:05:01 -0700 (PDT) In-Reply-To: <543DCE2B.8010506@sugarcrm.com> References: <776669CE-9E8C-4069-9834-C7275CCA0EF4@ajf.me> <8CB055D4-F164-4DF3-B019-684BAE7E016E@ajf.me> <543D47C1.9050009@lerdorf.com> <543D4CE1.5000109@lerdorf.com> <543D6864.10508@gmail.com> <543D85E6.2020507@lerdorf.com> <57b7a3681d6c2c7ae123c8921b2d19d6@mail.gmail.com> <543DCE2B.8010506@sugarcrm.com> Date: Wed, 15 Oct 2014 18:05:01 +0300 Message-ID: To: Stas Malyshev Cc: Zeev Suraski , Kris Craig , Rasmus Lerdorf , Rowan Collins , PHP internals list Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] New globals for PUT and DELETE From: park.framework@gmail.com (Park Framework) 2014-10-15 4:30 GMT+03:00 Stas Malyshev : > Hi! > >> PHP today to enable successful & easy implementation of RESTful > interfaces. > > Having done this, I beg to differ. > >> Try to send a parameter in the body, by PUT method, for reading >> parameters have to use an ugly way file_get_contents(=E2=80=98php://inpu= t') > > What exactly is the problem in this one-liner? > >> But yet worst, you can not do upload files and send parameters because >> - php://input is not available with enctype=3D"multipart/form-data" > > I'm not sure I understand what you're trying to do, could you explain in > more detail with examples? PUT /url Content-type: application/x-www-form-urlencoded parse_str (file_get_contents(=E2=80=98php://input'), $_POST) // Ok PUT /url Content-type: multipart/mixed; boundary=3D"xxxx" file_get_contents(=E2=80=98php://input') // Empty string