echo

Type code in to a text input form, how?

Hello! I want to know the best way of writing out my "$imagepath" in to this input This is my upload script <?php if(isset($_POST['submit'])){ if (isset ($_FILES['new_image'])){ $imagename = $_FILES['new_image']['name']; $source = $_FILES['new_image']['tmp_name']; $target =...

Windows telnet + controlling local echo from remote

Hello, I have the same problem as http://stackoverflow.com/questions/1098503/how-to-unsupress-local-echo but none of the solutions in that thread are desirable. Specifically, I'm using telnet for communication with a simply Ruby program that requires authentication to connect remotely. When the user is prompted for a password I want to ...

PHP echo vs PHP short tags

Are they equal in safeness? I was informed that using <?=$function_here?> was less safe, and that it slows down page load. So I am now strictly biased to using echo. I just wanted to know the advantages/disadvantages, or are they pretty much the same. ...

php echo vs open&close tag

Just to clarify: The issues "echo vs print" and "double quotes vs single quotes" are perfectly understood, this is about another thing: Are there any reasons why one would prefer: echo '<table>'; foreach($lotsofrows as $row) { echo '<tr><td>',$row['id'],'</td></tr>'; } echo '<table>'; over: ?><table><?php foreach($l...

How can i stop cakephp to stamp execution time of the page?

Duplicate: http://stackoverflow.com/questions/1220855/how-to-remove-cakephps-trailing-timing-benchmark-comment cakephp stamps execution time as html comment at the bottom of the page, something like <!-- 4.031 s --> How can i stop cakephp to output this?? I need to avoid this print because in some ajax queries (that...

Simple Php Echo

I am just starting to learn php, how would I initiate a echo statement after a submit button is pushed, or even a anchor tag. Here is my code so far form name="myform" method="get" actions="madlib01.php" Name: <input type="text" name="name" /> <br /> <input type="submit" name="submit" /> form <?php $Name = $_GET['name']; ...

Expected 1 argument(s) for "int system(const char *)"; had 2 instead.

void TATTDataset::AckErrHandler(const NDataString& ErrMsg) { system("echo ErrMsg: %s >> err", (const char *)ErrMsg); ...... code ....... } What does this error message mean? How do I resolve it? ErrMsg.toCString() doesn't help either. Any suggestion? EDIT: I edited the code as suggested - String s; Char *tmpStr = ErrMsg...

disabling windows ability to respond to ping request

im writing an application destined to accept icmp echo request, and respond icmp echo reply by its criteria. problem is, windows xp takes over the received ping, and quickly replies the sender with a response. i tried disabling this ability through windows firewall and microsoft managment console, it worked but it disabled me from sendin...

shell script printing contents of variable containing output of a command removes newline characters

I'm writing a shell script which will store the output of a command in a variable, process the output, and later echo the results. Here's what I've got: stuff=$(diff -u pens tape) # process the output echo $stuff The problem is, the output I get from running the script is this: --- pens 2009-09-27 10:29:06.000000000 -0400 +++ tape 20...

Problem with echo $PATH

I am working on bash shell When I type echo $PATH on $ prompt I get the value of path environment variable as /opt/bin:/usr/local/bin:/usr/bin:/bin:/usr/games I am creating my own shell and I want to print the path environment variable when user enters echo $PATH. How do I do that? ...

PHP Japanese Strings getting set to ????????????

I have a PHP file with one simple echo function: echo 'アクセスは撥ねりません。'; but when I access that page i get this: ???????????? Can someone help me? I also have my page encoding set to UTF-8, and I know it, because all of the browsers i used said so. I also do this before the echo function: mb_internal_encoding('UTF-8'); What does th...

Echo SQL query on new page with PHP

I know this is probably a really amateur question, but I can't figure this out and I don't know much about PHP or MySQL. So I have a really simple script that basically allows a user to submit a couple lines of text and their zipcode, then it write it to a database and returns the results on the site. It's a shoutbox essentially. My c...

What's the difference of echo,print,print_r in PHP?

I use echo and print_r much,almost never use print. I feel echo is a macro,and print_r is alias of var_dump. But that's not the standard way to explain the difference. ...

include/echo output of PHP

I got two projects running, both written in PHP. Now I want to merge these two projects. The first project is a CMS and on a specific page i will display the contents of the other project / application. I don't want the first project to know about, or get access to, the variables and functions in the other and vice versa. So i just want ...

PHP Echo text Color

How do I change the color of an echo message and center the message in the PHP I've written. The line I have is: echo 'Request has been sent. Please wait for my reply!'; ...

date in shell script

Hi All, I have a shell script with a lot of echo statements. I want to prefix each line of output with the time/date. So, I replaced every echo "Some text1" echo "Some text2" with echo "`date +%y/%m/%d_%H:%M:%S`:: some text1" echo "`date +%y/%m/%d_%H:%M:%S`:: some text2" This is rather ugly. Is there anyway to create an alias (o...

Ignore data within a certain set of characters with PHP

Not sure what this is called, but is there a way I can pull data from a file, echo it, but ignore data within a certain set of characters? <?php echo file_get_contents('test.txt'); ?> Would it be possible to ignore the data in between the asterisks, and the asterisks themselves when I echo out the final function? ...

PHP preg_replace text variable

I want to echo a string with the variable inside including the ($) like so: echo "$string"; I dont want it to echo the variable for string, I want it to echo '$string' itself, and not the contents of a variable. I know I can do this by adding a '\' in front of the ($), but I want to use preg_replace to do it. I tried this and it doesn...

How to "echo off" the serial port in java

Hi , I am using java comm library for serial port communication in my application. When I put some data on output stream, after sometime the same command is displayed on input stream of serial port. Do anybody has any idea how to echo off the serial port? ...

Line Break within echo in a while loop

Quick question, again, I'm sure this is ridiculously simple but I don't see what I'm doing wrong! while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) { echo "<a href=\"http://mysite.com/{$row['row1']}/{$row['row2']} \">{$row['row3']} </a>"; } This produces all my links to be stacked up one after the other. I want to order them in...