11.4. Calling System CallsA system call is used by an application to request service from the operating system. System calls use machine code instructions, which causes the processor to change modes. Changing the mode gets the OS to perform restricted actions; for example, accessing hardware devices or server space available. Every OS provides a library that sits between normal programs and the rest of the operating system, such as the Windows API. This library handles low-level details of passing information to the kernel and switching to supervisor mode. You can use the exec function to call external functions.
For example, if you'd like to get information about how much space is available on the server, execute the df command, shown in Example 11-29. However, this is assuming you're on a Unix host. Example 11-29. Executing df and displaying the results
For our system, we get the screen in Figure 11-23. Figure 11-23. A synopsis of how full the hard disk is, from PHP
We're now going to discuss modifying objects in MySQL and working with data using PHP. |