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 8438287
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T07:40:17+00:00 2026-06-10T07:40:17+00:00

I am trying to do… <?php $content = `echo ‘h1 happy days’ | jade`;

  • 0

I am trying to do…

<?php $content = `echo 'h1 happy days' | jade`; ?>

But it does not return anything. Other commands do (for example ls)

I tried adding jade to the path, making a link in /bin which works from the command line, but not from within php.

What am I doing wrong?

Edit:

From command line:

bash-3.2$ pwd
/Users/billy/test/website-clear
bash-3.2$ echo 'h1 happy days' | jade
<h1>happy days</h1>bash-3.2$ which jade
/bin/jade
bash-3.2$ 
  • 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-10T07:40:18+00:00Added an answer on June 10, 2026 at 7:40 am

    You have two other options that might suit you well:
    1. proc_open if you want more degree of control:

        $handle = proc_open("jade", array( array("pipe", "r"), array("pipe", "w"), array("pipe", "w")), $pipes);
        fwrite($pipes[0], 'h1 happy days');
        fclose($pipes[0]);
        $result = stream_get_contents($pipes[1]);
        return $result;
    

    2. Using exec:

        exec("echo 'h1 happy days' | jade", $output, $retval);
        return $output;
    

    Make sure that you have jade in path or use the full path to jade executable.

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

Sidebar

Related Questions

Trying to build out an exception if move.UserId does not equal currentUserId then Redirect
trying to work out how to install zipArchive extension with MAMP, but not having
Trying to send a PHP email the easy way but I cannot work out
Trying to load a page fragment, or at least jump to a div but
Trying to do this, but is it wrong? Below is my style and script
Trying to find some information on this but am unable to get any results
Trying to execute a Powershell cmdlet from a MVC 3 Controller using impersonation but
Trying to convert a perl script to php. In perl I have a hash
Trying to merge 8 pre-sorted arrays. I'm fairly new to C, but this is
Trying to get jquery AutoComplete to return and populate it's dropdown. The input and

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.