Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7886795
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T05:24:40+00:00 2026-06-03T05:24:40+00:00

<?php if(!isset($_REQUEST[‘filename’])) { exit(‘No file’); } $upload_path = dirname(files). ‘/’; $filename = $_REQUEST[‘filename’]; $fp

  • 0
<?php

   if(!isset($_REQUEST['filename']))
   {
     exit('No file');
   }

   $upload_path = dirname("files"). '/';

   $filename = $_REQUEST['filename'];

   $fp = fopen($upload_path."/".$filename.".wav", "wb");

   ***fwrite($fp, file_get_contents('php://input'));***

   fclose($fp);

   exit('done');

?>

I am using this example try to record audio and send it to the server. With PHP it works fine, but I want convert this code into Ruby. In this line there is (php://input), what is that mean? And what should I write same in ruby

fwrite($fp, file_get_contents(‘php://input’));
Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T05:24:42+00:00Added an answer on June 3, 2026 at 5:24 am

    Obviously ruby does not have the php:// stream wrapper – it’s PHP specific. So you can not port it literally.

    php://input is explained here: http://php.net/manual/en/wrappers.php.php

    php://input is a read-only stream that allows you to read raw data from the request body.

    So for example, if that is a post request (which is normally the case), for Rails 3, the request.raw_post documentation is at http://api.rubyonrails.org/classes/ActionDispatch/Request.html#method-i-raw_post .

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following script validation.php <?php if(!isset($_SESSION['userId'])){ session_destroy(); header('Location: home.php'); exit; } ?>
Code: <?php if (isset($_REQUEST['g'])) { if ($_REQUEST['g'] == Set) { $g = strtolower($_REQUEST['g'])._title; }else{
<?php if(isset($_REQUEST['searchcat'])) { $search_category = $_REQUEST['searchcat']; switch($search_category) { case 'Purchase': $city = mysql_real_escape_string($_REQUEST['city']); $location
<?php if(isset($_REQUEST['submit'])) { $category = mysql_real_escape_string(implode(',', $_POST['category'])); } $ins=mysql_query(insert into fruits (`category`) values ('$category')
My php code looks like that if (isset($_REQUEST['term'])) { $term = trim(strip_tags($_REQUEST['term']));//retrieve the search
<?php if (isset($_GET['action']) && (!$_GET['action'] == 'reply')) { ?> <div class=actions> <input type=button onclick=javascript:
I'm looking for Java's equivalent of PHP's isset() ; int board[][]=new int[8][8]; ... if(isset(board[y][x]))
I have the following PHP code: <?php if(isset($_GET['article'])) { echo <b>success</b>; } ?> And
I have the following pages: page1.php <?php if (isset($_GET['link'])) { session_start(); $_session['myvariable'] = 'Hello
I have code like this: <?php if(isset($global_info_results)): ?> <?php echo count($global_info_results) ?> <span>Mali Oglasi:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.