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

  • SEARCH
  • Home
  • 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 7808379
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T03:07:09+00:00 2026-06-02T03:07:09+00:00

I need some help with escaping the quotes in this script, I have code

  • 0

I need some help with escaping the quotes in this script, I have code above and below, but it does not pertain to this because if I just issue a screen -d -m -S minecraft, it creates one fine. Any help would be amazing because i’ve been trying for an hour now, Thanks!

 if (!($stream = ssh2_exec($con, 'screen -d -m -S minecraft -p 0 -X stuff "\printf "\say This is a test.\r"\"\' ))) {
        echo "fail: unable to execute command\n";
    } else {
        // collect returning data from command
        stream_set_blocking($stream, true);
        $data = "";
        while ($buf = fread($stream,4096)) {
            $data .= $buf;
        }
        echo $data;
        fclose($stream);
    }
  • 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-02T03:07:11+00:00Added an answer on June 2, 2026 at 3:07 am

    Shouldn’t the \ should go before the ". Also, from your description, it sounds like that you only want to run “screen -d -m -S minecraft” and it looks like you have an extra printf in there.

    if (!($stream = ssh2_exec($con, "screen -d -m -S minecraft")))
    

    http://php.net/manual/en/language.types.string.php

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

Sidebar

Related Questions

Need some help please with this error : TypeError : 'unicode' object does not
Need some help to solve this. I have a gridview and inside the gridview
Need some help with below issue We have 2 machines, each of these machines
I need some help with my jQuery script. I have a page that refreshes
I need some help from the shell-script gurus out there. I have a .txt
Need some help with putting this query together. I'm using Mysql I have two
Need some help refactoring this code: $(span[rel=color_content]).ColorPicker({ onChange: function (hsb, hex, rg) { $(span[rel=color_content]).css('background-color',
I need some help with some advanced file include code.. I googled around, but
I need some help. Don't know if this is possible. I want to have
need some help with this one. I have some reflectance values for a colour

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.