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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: dev at kbonez dot net
New email:
PHP Version: OS:

 

 [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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Wed Feb 05 06:01:32 2025 UTC