JavaScript Editor Javascript source editor     Web programming 



Team LiB
Previous Section Next Section

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.

    Team LiB
    Previous Section Next Section


    JavaScript Editor Javascript source editor     Web programming