Executing Multiple Shell Commands Via One Exec()-call
I wrote a PHP shell script under Linux which puts all existing
[E]PS-Files within a directory into a list and should then start a
single Ghostview window for each file. Sounds simple, but it's not:
The following code provides for about half of the functionality I
wanted:
==============code starts
$bla = array();
foreach ($filelist as $file)
{
$bla[] = fopen("./trash/".$file.".tmp", "w");
exec ("gv ".$file." &", $bla);
}
===============code ends
Here, all files are opened one after another. The next file opens only
after closing the current one. Actually I don't know whether the
redirection of the output towards .tmp-files complies with the
intended purpose of the redirection. The PHP manual states that when
starting programs in background, the output would have to be
redirected to a stream or file, otherwise PHP would continue to run
until the respective program is terminated (which I really wouldn't
care about at all, if it did so...).
Then I thought about writing the line I would type manually for
opening all ps-files ('gv bla1.ps & ; gv bla2.ps&; ...') into a string
and then executing that string:
===============code starts
$command="";
$bla = fopen("./trash/tmp", "w");
foreach ($filelist as $i => $file)
{
if ($i < count($filelist) - 1)
{
$command = $command."gv $file & ; ";
}
else
{
$command = $command."gv $file &";
}
}
exec ($command, $bla);
===============code ends
sadly I get an error message from the shell:
================ error message starts
sh: -c: line 1: syntax error near unexpected token `;'
sh: -c: line 1: `gv uges_Boden.ps & ; gv ux_Boden.ps & ; gv
uy_Boden.ps &'
================ error message ends
View Complete Forum Thread with Replies
Related Forum Messages:
Shell Commands
Is it possible to write a script that will run commands at a command prompt? say copying some files and changing ownership on some files, like an install script?
View Replies !
PHP Shell Commands
Some php applications store database passwords into files which can be read by the user www-data. So, a malicious user which can write php scripts could read those passwords. What should I do to prevent users from viewing those passwords?
View Replies !
Run Shell Commands With PHP
I want to run few shell commands with PHP. I need to run lsof i :<port_no> and kill all the process running on that port number. I tried" <?php $output = shell_exec('lsof -i :8080'); print "<pre>".$output."</pre>"; ?>
View Replies !
Displaying Shell Commands
How would I display a information on my website identical to how it would look if i typed it on a shell? For example, if I type df at the shell it puts each different partion on its own line. If i do: system("df"); It all gets jammed in to one line.
View Replies !
Executing A Shell Command
I try to use the backtick "`" to exacute a shell command from a PHP script. However, `touch file`; doesn't make the file. Neather does exec(), system(), etc. They all work when is used a different command, such as pwd, or ls. So what's a brotha gotta do to creat a file?
View Replies !
Executing Commands (linux)
I'm not really sure the best way to appoach this but basically i want to be able to run game server commands in a specific linux account eg. 'screen -A -m -d -S hlds_server1 ./hlds_run -game cstrike -autoupdate +servercfgfile server1.cfg &' I want to run this off a different liux account (not root) i tried using the search on the forum but want really sure what to search for so i didnt get very far. Whats the best way to go about this? can i use shell_exec() and login to my other accout and run these commands? i have tried this but couldnt figure out how to login to my other account. i would preferable like to beable to do this remotely (but atm my http server is run on the same server as the server i run my games off) so might the way to use sockets and connect through ssh port? and send the commands through that?
View Replies !
Executing A Remote Script (unix Shell)
I would like to add a button on a PHP page which allows to execute a script on a remote machine (without a web server on it...) using login and password to access it. I've tryed to use a "system" and "rsh", but with the rsh I can't access with password.
View Replies !
Permission Denied Executing Shell Command
I am getting following error when executing shell command from PHP, where PHP/Apache is running as "nobody". du: '/home/example/mail': Permission denied du: cannot access '/home/example/mail/example.com/demo/': Permission denied.
View Replies !
Executing System Commands In 'parallel'
Basically I just want to be able to execute an external program 50 times (a perl program on a linux system) from within a PHP script and have the jobs all start 'right away'. I'm using exec in a loop now and what's happening is that the one to finish before the next one starts. This isn't good because the programs take a long time to finish and I'd like them to run in parallel.
View Replies !
Shell Exec
I want to call an external console program and get its output, that's what I did: execute.php : <?php $output = shell_exec('F:/Apache2/htdocs/misc/excecute.exe 8 6'); echo "<pre>$output</pre>"; ?> execute.exe: is a console program which multiple argv[1] with argv[2] and printf the result, I have tested execute.exe in Dos mode works perfectly, but when I run the php script, I get no output.
View Replies !
Detect If A String, Contains Executable Commands (w/o Executing!)
I have an interesting problem, where it would be important to detect whether or not a particular string contains executable commands (ie. via eval). For example, I'd need: "echo a b c" to return true whereas "a b c" would not. I'd guessed that I could compare highlight_string output, but this may introduce unnecessary complexity. Short of building a list of absolutely all PHP commands, I was wondering if anyone here had a quick trick I could use!
View Replies !
System/shell/exec/etc
I've got PHP 5.1.6, Apache 2.2.2, on Fedora 5. Everything is great except that when I use an of the external launching commands, persistent apps dont stay open. I have a simple shell script set up to load an app, and I have it write a PID file. Immediately after calling exec (milliseconds later) the PID is alive. However, within a few more milliseconds it seems to close. I've made sure that the apache uid/gid have full access to the script and the apps it calls. When sudo'ing manualy in a shell with the apache uid, the script works flawlessly and loads the program, and stays open, as it should. I've verified that the app loads under the uid 'apache' with ps. When running it through PHP, it seems to close almost immediately after succeeding. Is there some fundamental issue with how this works that I'm missing? I can't seem to get any real errors out of php, apache, or even the shell when redirected to a file. Should I try PHP4? Is PHP5 buggy with this kind of thing? I even tried running 'at' to schedule the script (so that it'd be invoked by at instead of the shell itself) but that failed, silently, as well.
View Replies !
Exec() Function And Shell Scripts
I have a shell script written that basically grabs a selected .jpg or .png image file and wraps it as an .swf file for use in a dynamic Flash site. My question is this: What are the limitations of the exec() or system() commands? I can get them to work just fine with common linux commands(ie. ls -l, pwd, etc.), but it won't run these sort of commands: ./thisisascirptname or sh wrapper.sh I get no results with these and yet when I perform the same operation on the command line by hand, it works just fine. This is the script I'm using to test it, by the way. $lastline = exec("sh wrapper.sh", $all_output, $return_value); print("<b>Last Line:</b><br>$lastline <p> "); print("<b>All Output:</b><br> "); for($index = 0; $index < count($all_output); $index++) { print("$all_output[$index] <br> "); } print("<br><br> "); print("Return Value: $return_value<br> "); The "ls" and other similar functions all return properly. I can't figure this out and it's driving me nuts. Any help?
View Replies !
Shell Symbols And Exec Problem
I have a problem running following shell command from php exec or system call: exec("/bin/cat $(/bin/cat list.txt) > concatenated.txt"). This works when i run it directly from the shell as user nobody (apache user), so its not a path/permissions problem. Basically list.txt contains a list of filenames, which are to be read and concatenated into one big file (concatenated.txt). I have even tried writing a shell script, wrapping this command, and tried running it, but still no result. The script either way just writes an empty concatenated.txt.
View Replies !
ProgressBar For A Shell Exec Command
I am executing a shell command through php $command = "some mathematical calculations": $output = exec($command); The $output takes approximately 10 - 40 sec for its execution every time. I wanted to show a progress bar proportionate to the time of execution. Code:
View Replies !
Bug In System And Exec Commands
If PHP is running via a web server, and mutiple system calls are made within the script to another script, hundreds of processes are created. Here is an example: Script 1: <?php for ($i=1; $i<=5; $i++) { system("php script2.php"); } ?> Script 2: <?php exit; ?> The effect is the same (and more difficult to stop) when the system calls are made in the background. e.g. system("php script2.php >>/dev/null 2>>/dev/null &"); system("php script2.php >/dev/null 2>&1"); I have even tried calling a shell script, which in turn calls the second PHP script (both in the background), but it still causes lots of processes. The "exec" command is also affected. At first, I thought this was a problem with either Zeus web server of Fast CGI, but I have since tried it with Apache and normal CGI with the same effect. Does anyone have any idea why this happens and whether there is any way to prevent it? I have posted a bug report to bugs.php.net (ID 14997), but so far to no avail.
View Replies !
Calling Commands Using EXEC
I'm trying to call the command taskkill in a script of mine. the code looks like this exec("taskkill /f /s $compname /im iexplore.exe", $output); As far as i can tell the code is doing nothing, it doesn't throw up any errors but it doesnt work either. I have tried replacing the variable $compname with the actual computer name but this dosen't work either.
View Replies !
FFMPEG Exec() Commands
I'm relatively new to PHP and am creating a website which will take uploaded files and convert them to FLV files for quick viewing using an FLV player. It is similar to YouTube. After a successful upload I hope to first convert the video file to FLV, and then create a thumbnail from the FLV file. In my upload script, the two commands follow eachother: exec("Video to FLV Conversion"); exec("Thumbnail creation"); The video converts always, and on very small videos (below 500k) the thumbnail creation works as well... but for larger files, the thumbnail creation does not execute. But if I run only the "exec('Thumbnail creation');" after the FLV has already been converted, it creates the thumbnail. My thoughts are that the Thumbnail exec() starts before the FLV Conversion exec() is completed. Is there a way to ensure the first exec() finishes before continuing through the script? I could also try merely taking the thumbnail from the initial video file (non-FLV) and it may work fine... but I thought I'd ask here first as I've read some complications creating thumbnails from several types of video files.
View Replies !
Sh And Psql Commands From Exec()
I'm having problems with exec(). I'm trying to execute a shell script that executes psql command to dump results to a CSV file. exec('/bin/sh /path/csv.sh'); csv.sh executes /usr/local/pgsql/bin/psql -d dbname -u user -f /path/output.postgresql (output.postgresql is the file that has some queries to output the results of a select statement to an output CSV file.) while this works on my local machine (Intel Mac OS X 10.4, Apache 2.2, PHP 4.4.3) it fails to run on FreeBSD (Apache 1.3, PHP 4.4.2). it seems like the user "nobody" running the Apache Web Server is failing to run the commands using the exec() function. I'm guessing that the reason why it's failing is that the psql is asking for a password, but I cannot place the .pgpass file since nobody has no home directory. Also I haven't tried the NOPASSWD for nobody in sudoers file. I'm not sure if this is a good idea since apache can then run any sh and psql commands from exec().
View Replies !
Exec() Launched From Linux For Win Commands
this is my environment : Apache is installed on a Linux server (RedHat9A) and I launch the browser on a PC running WindowsXP to execute php scripts on the Linux server. I would run Win executables from this Linux-based Apache server. Actually if I use exec() command running Linux commands, something like : $command="mv /store1/www/file1.txt /store1/www/file2.txt"; exec($command, $ar_output, $res_command); echo "res_command=".$res_command; it returns : res_command=0 and all works fine. The problem arises when I try to use the same exec command for running applications in the PC, e.g.: $command="C:ProgramsWINEDIT.EXE"; exec($command, $ar_output, $res_command); echo "res_command=".$res_command; Now it returns : res_command=127 and it does not work ( = it does not start WINEDIT.EXE)
View Replies !
Exec And System Commands Blocked By Host
I've got this code, its the simpliest example I could make. It works perfectly on my windows xp/apache/php box, but doesn't do anything on a commercial website host. The actual code should use gzip to compress a folder but that doesn't work either. Anyone know the reason why they would be blocking these commands? I suspect the problems with commonly used php apps like phpBB to be the real reason. <? exec("ping 127.0.0.1 > test.txt") or die(); // get contents of a file into a string $filename = "test.txt"; $fd = fopen ($filename, "r"); $contents = fread ($fd, filesize ($filename)); fclose ($fd); echo $contents; ?>
View Replies !
Problems With Executing Binaries With Exec()
I have problems with executing external programms in php with exec() and system(). When i am trying to execute some shell commands eg system('ls'), exec('whoami') there is no problem , with my binaries (the simplest hello world program in c++) - no problem. But programms, which i've installed(./configure make make install) before, don't work.' For example i've installed cvs. Code:
View Replies !
Exec Command Executing The Program In The Background
i am running xampp on my computer from apachefriends.org, it's a apache server this is the php script <html> <head> <?php exec ('notepad'); ?> </head> </html> but when i execute the php script on my computer , notepad doesnt not run i used a process viewer and discovered that notepad is running in the background and i cannot see it does anyone know how NOT to make it run in the background? i wan to see the notepad window on the apache server (my computer)
View Replies !
Exec And Shell_exec Not Executing Batch File Properly
I am running Apache and PHP on windows XP. Latest versions of them all. I am trying to execute a simple .bat batch file that simply copies 4 files from one location to the batch files location. The php exec command runs like this: V:Corehtdocswp ransfer.bat Y:folder here the batch file is executed and the command following is thrown into the batch file to specify where the files that need to be copied are. The Y: directory is in windows considered to be a network drive, although it is really just a folder on the same machine, i did this because there are spaces in the folder names on its way to where I need the information copied from i.e. "Program Files" When I run this in the command prompt by entering this in manually it runs perfectly. However when running exec in the PHP script nothing happens; when I run shell_exec it gives me the output and it shows that every line in the batch file is executed however it does not actually copy anything. Looking into my apache error log I see that this is related: "The system cannot find the drive specified." Now what I am wondering is, how is it that I can run this script manually but apache tells me I cannot. My permissions are set to allow all and deny nothing since it is a machine well tucked into a safe place. Apache resides on the machine in C: eactorcore and it also setup a virtual drive as v:core. Trying both does not work.
View Replies !
Call To Undefined Function Socket_create() - Executing A Third Party Script
Using: Win2003 - IIS6 - PHP5.0 I'm executing a third party script and get this error message: Fatal error: Call to undefined function socket_create() in C:InetpubXXX on line 195 After some googleing, I think it is because sockets aren't enabled. I've opened php.ini and uncommented the line extension=php_sockets.dll and restarted the world wide web publishing service, but I still get the same error message. No clue what to do from here. Does anyone have any suggestions?
View Replies !
Exec() Call To External Program
We are trying to use the exec() or system() calls in a php script. The program we are trying to call takes 1 parameter in the form of: email@domain.com[usercode] There are no spaces in the parameter at all and we have tried placing quotes around just to see if it mattered. We have also modified the parameter just to send it hello. Here is what we get: With no parameters the php script executes the program where it displays the error message from the program stating that not enough parameters were supplied. We then add the word "hello" to the end after a space so the command looks like this: command "hello" and the program no longer executes at all. No matter what we do, if we supply an argument to the command the php code will not execute the program.
View Replies !
Multiple Commands
In my PHP code, I want to execute the following two commands: use mydb; select * from mytbl; Now, I can get it work with the following statements: $SQL = "use mydb"; $result = mysql_query($SQL ); $SQL = "select * from mytbl"; $result = mysql_query($SQL ); What I really wan to do is "something" like: $SQL = "use mydb "; $SQL .= "select * from mytbl;"; $result = mysql_query($SQL ); i. e. I want to concatenate the two statement and execute the query only once. Is there a way to do this with mysql_query (or with someother function)?
View Replies !
Using Multiple Commands
How do you use all of these commands on a single insert entry? addslashes(), stripslashes(), htmlspecialchars(), htmlentities() how would you use it on something such as this: $result = mysql_query("UPDATE products SET mainContent = '$mainContent'"); Anyone have a clue?
View Replies !
Exec, Passthru Disabled So How To Call C++ .exe File?
I am at my wit's end trying to get information out of Streamline.net's support dept about my problem. They reply quickly enough, but seem to try and give out the least possible amount of info each time. The transcript so far is reproduced for your amusement below. To summarise: I've put up a Sudoku-solving program called Sudoku.exe. I want to call it in a php script to solve a puzzle and output the solution. It works fine with Apache/php on my own machine, but it seems Streamline.net disable exec, passthru etc. They eventually say, cryptically: ' CGI executables are supported, however this is very different from executing a program from within a PHP script'. So how would I call my Sudoko.exe file? The 'dialog': My last question seems to have been 'fixed' before being answered, so I'll have another go. I'm trying to call an .exe file on the server but get an 'unable to fork' error message. I have Apache/php installed locally and it works fine. Do you have to turn on 'cmd.exe' permissions or something? Try it yourself at: Warning: passthru(): Unable to fork [Sudoku.exe (argument...)] in (.php file...) It's the same with exec() as well. We do not support passthru or exec functions. So how would I call my Sudoku.exe program from a php script? I do not want 'scripting help', I just want to use some of the functions that you offer as a host and which I have paid for. As I have said what I am trying to do works perfectly on my machine, so it must be a question of something you have to enable your end. What do you mean you don't support passthru or exec? They are both standard php commands. . You asked "how would I call my Sudoku.exe program from a php script?" clearly this is asking us how you can use scripting? Certain functions are disabled in PHP for security reasons. Which functions are 'disabled in PHP for security reasons' ? You can find this out with the inbuilt php function phpinfo() Could you tell me where on the page that phpinfo() produces these functions are listed? For example, passthru() does not appear to be on the page. . search for "disable_functions" on that page. disable_functions lists 'no value'. So again, could you tell me where I can find the list of standard php functions which you have disabled? Please can you provide a link to your phpinfo file so we can investigate this further. We had previously checked this on a linux server, which showed the functions that have been disabled. We've passed this on to an engineer to investigate further. For your information the following are disabled: shell_exec,exec,system,passthru,popen Your knowledge base says: Q. Are CGI (Common Gateway Interface) executables supported? A. Yes these are supported on either the Windows and Linux servers But you are telling me that the only php functions which can call my executable are disabled. Will you clarify once and for all if I can call my exe file or not. I AM NOT ASKING FOR SCRIPTING HELP, I have books about that. I just want to know if I can do ON YOUR SERVER what you say I can do, and if not why not.
View Replies !
GLOBAL OBJECT IN EXEC COMMAND CALL
I have an object: $special = new special; Let's say I have a function: class special { function outputtext() { return "test"; }} now let's say I want to use the exec command to output that text: exec("/usr/local/bin/php -r 'echo $special->outputtext();'",$returnarray,$returnvar); I get an error call to a member function on a non-object. Any ideas how to pass teh GLOBAL OBJECT var into the shell exec command? I am haivng a terrible time figuring out what to do.
View Replies !
Sockets And Multiple Commands
I'm trying to pull information from a server using a socket(which I have done). I have 80 different commands that I need to execute on the server and retrieve the results for. Each command looks like this: $com1 = Connect($ip, $port, $command); echo $com1; If I just pass all of the connect statements (one per line) then php hangs and the page takes forever to load (sometimes doesn't). I found a workaround to this using sleep(1); but I don't want to have to wait 80 seconds to retrieve text that can be pulled much faster. Before this I had a connection that I could use to pass a single command that would return all 80 values that I need but the packets would get broken up so badly (udp) that I couldn't put them together again as halfway through some of the values where a new packet would start it would remove one of the letters of the value I was looking for and my function to search the retrieved data for that particular value would fail.
View Replies !
Multiple Database Commands
is it possible to send mysql a command of this sort? PHP Code: SELECT * FROM databaseone.tableone, databasetwo.tabletwo WHERE databaseone.tableone.idfield = databasetwo.tabletwo.idfield AND databasetwo.tabletwo.field = 'abc'
View Replies !
Mysql_query - Multiple Commands After The Or Statement
I have this. $result = mysql_query($query) or die ('MySQL query #21 failed.'); How could something like this be possible? $result = mysql_query($query) or $success = 'failed', $debuginfo = 'MySQL query #21' What I want to do is to do multiple commands after the or statement, and avoid using die so I can handle the error reporting myself later in the code. How should I separate multiple commands when using or statement? I can specify only one command( or $success = 'failed' ), but I couldn't find a way to specify more commands.
View Replies !
Executing Multiple Queries
I'm trying to tailor a form page that has multiple submits. I've tried to set up a number of conditions but I'm having trouble with the second query. It just does nothing. Here's the whole code: Code: <?php require 'config.php' ?> <?php require 'flinfo.php' ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>FAB Loot - ZG Upload</title> </head> <body> <?php if (isset($addinfo)): // If the user wants to add information ?> ...........
View Replies !
Executing Multiple SQL Queries (MySQL)
I am writing an install script, which needs to build the tables and insert specific records for the application. There are about 50 or so queries. (format exported via phpMyAdmin) I've got all these queries in a file - how do I go about running them all individually? Clause - I can't simply use file() and do each like that. The SQL statement for the tables is in a multiline format, like this: Quote: CREATE TABLE `categories` ( `ID` int(11) NOT NULL auto_increment, `parentID` int(11) NOT NULL default Ɔ', `name` text NOT NULL, `description` text NOT NULL, `filename` text NOT NULL, PRIMARY KEY (`ID`), UNIQUE KEY `ID` (`ID`) ) TYPE=MyISAM;
View Replies !
PHP Call From Multiple Clients
I know this is gona get me in trouble but I have to ask. I have a PHP code ( also calls mysql ) on my website that gets called from multiple clients using winsock. Some of the clients are listing data in the database via PHP. Some are reading data. So here is the question. Will all the calls get serviced? Are the calls to the same php file buffered or cued up in some way?
View Replies !
How To Call Multiple Functions Concurrently
I have a php function that is passed some parameters, and goes off a fetches some data from a remote source, and returns it. This php function, is being called by a loop, on another php page. The function, always takes approx 2.5 seconds to run. The issue I have is that on a particular page, the function might be called by a loop 4 or even 20 times. Because the loop calls the function, waits for it to complete before it loops around and calls it again, we are only having the function run serially, eg: one at a time. The function is not disk, cpu or network intensive. If many instances of the function were called at once, they would still only take 2.5 seconds to run. So my question is - how can I have this function run concurrently? This might stray away from PHP a bit, the only idea I had was to have the php code output javascript code, which, once the page has been output, calls all the functions at once.
View Replies !
Running Multiple MySQL Queries With One Call
I've been trying to figure out how to run multiple MySQL queries with one database call. In phpMyAdmin, I can seperate sever queires with a ";", but mysql_query() doesn't seem to support this. (I get an error when trying to do it). mysql_query("SELECT blah FROM tbl1; SELECT this FROM tbl2 WHERE x = ƈ' INSERT INTO tbl1 VALUES (NULL,something)");
View Replies !
Warning: Ftp_exec() [function.ftp-exec]: SITE EXEC Is An Unknown Extension
This is kind of a part II to a question a posted earlier about exec and shell_exec not working. I'm trying to use ftp_exec to execute some simple command: $conn_id = ftp_connect("$server") or die ("Cannot initiate connection to host"); ftp_login($conn_id, "$username", "$userpass") or die("Cannot login"); $command = 'cd..' if (ftp_exec($conn_id, $command)) { echo "$command executed successfully"; } else { echo "could not execute $command"; } ftp_close($conn_id); I'm getting the following error: Warning: ftp_exec() [function.ftp-exec]: SITE EXEC is an unknown extension in /home/urieilam/public_html/work/video/test1.1.php on line 21 could not execute cd.. Have tried other commands as well, get the same. Could this be a security issue or something to do with p Safe Mode? I don't know much about commands, shell, etc..
View Replies !
Parse Error: Syntax Error, Unexpected T_STRING - Call Multiple Headers
I need to call multiple headers and have managed to fix the error 'Warning: Cannot modify header information - headers already sent by (output started at ' all bar the last header by using ', false' The line of code Code: Header('"Location:/".id_code(mysql_result($rs, 0, 'product_id'))', false); and I keep getting the error message Parse error: syntax error, unexpected T_STRING
View Replies !
Warning: Exec() [function.exec]:
I'm using PHP Version 5.0.4 in IIS5, Window 2003. When I execute my script, it prompt me the following error : Warning: exec() [function.exec]: Unable to fork [ping 10.8.1.70] in c:Inetpubwwwrootswitch.php on line 62 Below is my script : <?php $line1 = exec("ping 10.8.1.70", $output); exit; ?>
View Replies !
How To Run A .php From The Shell.
how to run a .php from the shell. I'm running debian, with Apache-ssl which is compiled with mod_php4. PHP for web sites works great. However, to run a php script from the shell, do I need to install php from scratch?
View Replies !
Shell Scripting With Php
I Always hear the praise of Perl for Shell Scripting. But this is the first time I am hearing about Shell Scripting with PHP. I also tried this and worked fine. So, I am sharing with you. Please read this article for details:
View Replies !
Interactive PHP Shell - Can It Be Done?
I'm interested in implementing a command-line PHP app that takes input line-by-line (for example, using Readline) and executes commands as they are entered. It would need to know the difference between this: echo "hello world"; which should be eval()ed after the first line, and this: for ($i=0; $i < 10; $i==) { echo $i; } which can't be executed until the block is closed. I suppose I could try calling eval() and catching errors until it works, but then how to distinguish between a data-entry error (e.g., "ecoh $i") and an error indicating that you're in the middle of a possibly valid block?
View Replies !
|