php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #52824 add execute shell-command directly feature
Submitted: 2010-09-13 06:01 UTC Modified: 2010-09-13 06:09 UTC
From: dev at kbonez dot net Assigned:
Status: Wont fix Package: CGI/CLI related
PHP Version: Irrelevant OS: ALL
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2010-09-13 06:01 UTC] dev at kbonez dot net
Description:
------------
dear,all. I think if php-cli mode can support nested shell-script directly. it 
must be awsome. 

#!/usr/bin/env php

<?php
/*php code */
?>

source abc.sh


if we can treat "source abc.sh" as a shell-script and execute it. it will be 
awsome. do you agree with me ? although we can execute php-script in sh-file 
like 
this 

#!/bin/bash
  php php-file.php

  source abc.sh

it's ungly,i think .we have to test it when we move it to another envioument. 

Embeded shell-script code  likes php nested in html-file , I think it will be a 
good feature.

Test script:
---------------
#!/usr/bin/env php

<?php
/*php code */
?>

source abc.sh


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-09-13 06:09 UTC] aharvey@php.net
-Status: Open +Status: Wont fix
 [2010-09-13 06:09 UTC] aharvey@php.net
You could already do this by having your "embedded" shell script in a PHP variable, invoking bash via popen() or proc_open(), and writing the script down the stdin pipe. I see no value in adding syntax for an obscure need.

Closing won't fix.
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Sat Apr 20 03:01:24 2019 UTC