Workshop


The workshop is designed to help you anticipate possible questions, review what you've learned, and begin learning how to put your knowledge into practice.

Quiz

1.

Which function is used to open a pipe to a process?

2.

How can you read data from a process after you have opened a connection? What about writing data?

3.

How can you escape user input to make it a little safer before passing it to a shell command?

Answers

1.

popen()

2.

You can read and write to and from a process just as you can with an open file, namely with feof() and fgets() for reading and fputs() for writing.

3.

If user input is part of your shell command, you can use the escapeshellcmd() or escapeshellarg() functions to properly escape it.



Sams Teach Yourself PHP MySQL and Apache All in One
Sams Teach Yourself PHP, MySQL and Apache All in One (4th Edition)
ISBN: 067232976X
EAN: 2147483647
Year: 2003
Pages: 333
Authors: Julie Meloni

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net