473,385 Members | 2,029 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

newb: Expain me this

I have the following code:

exec ("find /C \"$term\" *", $command_output);

Can you tell me how this string: "find /C \"$term\" *"
will appear after excaping characters?

Thank you

Dec 20 '06 #1
3 984
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

johnny wrote:
I have the following code:

exec ("find /C \"$term\" *", $command_output);

Can you tell me how this string: "find /C \"$term\" *"
will appear after excaping characters?
find /C "$term" *
- --
- ----------------------------------
Iván Sánchez Ortega -ivansanchez-algarroba-escomposlinux-punto-org-

http://acm.asoc.fi.upm.es/~mr/
Proudly running Debian Linux with 2.6.17-1-686 kernel, KDE3.5.3, and PHP
5.2.0-8 generating this signature.
Uptime: 02:07:36 up 8:15, 1 user, load average: 0.03, 0.19, 0.58

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFFiIzqR56dWuhgxGgRAufmAKDFvF3qB3/M82AFBE900FKmuo7aJQCfSiAo
MQhgJY1TaS0TodRuWk3+MD8=
=p3rc
-----END PGP SIGNATURE-----
Dec 20 '06 #2

johnny schrieb:
I have the following code:

exec ("find /C \"$term\" *", $command_output);

Can you tell me how this string: "find /C \"$term\" *"
will appear after excaping characters?
Each \ in conjunction with the next characte gets replaced by the next
character.

Dec 20 '06 #3
Also, you should be using the escapeshellarg() function on variables
passed to shell commands, especially if they contain user input. Even
register globals could be a potential problem if you're not expecting
user input.

http://php.net/escapeshellarg

On Dec 19, 4:59 pm, "johnny" <rampet...@gmail.comwrote:
I have the following code:

exec ("find /C \"$term\" *", $command_output);

Can you tell me how this string: "find /C \"$term\" *"
will appear after excaping characters?

Thank you
Dec 20 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Hari | last post by:
Basically I would like to downlod the visual basic 6.0 compiler, but i already have the vb.net compiler. I had to pay for the VB.net IDE, just wondering if I can get the vb 6.0 IDE for free or not....
0
by: David E. | last post by:
So as a programmer, what's the best thing to study? EJB? How much of the J2EE or Enterprise architecture is necessary to no? I guess I need a good overview for a newb like me... thanks.. --...
1
by: notbob | last post by:
Newb here! Using 4.0.20 on Slack. Slogging through the official manual. At 2.4.3 Securing the Initial MySQL Accounts, I'm finally stopped cold while trying to follow instructions. Here's what I...
11
by: The_Kingpin | last post by:
Hi all, I'm new to C programming and looking for some help. I have a homework project to do and could use every tips, advises, code sample and references I can get. Here's what I need to do....
1
by: HateSpam | last post by:
Total newb here. I've built a custom library called ClassLib1. I want to use the 3 classes I've got defined in there in a simple 1-form windows app. I added the reference to the .dll to the...
1
by: gerg | last post by:
I've bought a few books on the topic, but I'm a total newb to programming in general. I've got about 4 years PHP / MySQL experience, but none with "actual programming". To be honest, I don't even...
2
by: python programming newb | last post by:
Hi all, first post. I'm new to python and tkinter. I'm trying to write a program that opens the root window with a button that then opens a toplevel window that then has it's own widgets. I...
2
by: J | last post by:
Greetings Group- I'm trying to put together a pattern matching script that scans a directory tree for tif images contained in similar folder names, but running into a NewB problem already. Is it...
2
by: Andrew | last post by:
please explain this behavior to a newb:
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.