Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

flock,fgets,fseek,fputs,chop

Posted on 2004-11-04
1
Medium Priority
?
491 Views
Last Modified: 2013-12-13
Hi Experts..
what do these commands mean :
flock
fgets
fseek
fputs
chop
??


0
Comment
Question by:yazan3000
1 Comment
 
LVL 27

Accepted Solution

by:
Diablo84 earned 200 total points
ID: 12500148
Hi yazan3000

The online php manual is your friend, it has a description of all of the php functions as well as examples of use and additional user contributed notes. http://www.php.net

flock - see manual notes.
http://us2.php.net/manual/en/function.flock.php

fgets - gets line from file pointer.
http://us2.php.net/manual/en/function.fgets.php

fseek - seeks the file pointer.
http://us2.php.net/manual/en/function.fseek.php

fwrite (fputs is an alias of fwrite) - writes data to a file.
 http://us2.php.net/manual/en/function.fwrite.php

rtrim (chop is an alias of rtrim) - http://us2.php.net/manual/en/function.rtrim.php

More commonly trim is used - Strips whitespace from beginning and end of a string.
 http://us2.php.net/manual/en/function.trim.php

For reading data from a file its best to use file_get_contents which loads the whole file into a string.
http://us2.php.net/manual/en/function.file-get-contents.php

And as of PHP5 for writing to a file its best to use file_put_contents.
http://us2.php.net/manual/en/function.file-put-contents.php

A useful reference is: http://www.php.net/quickref.php
Which has links to the documentation for all of the PHP functions.
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Many old projects have bad code, but the budget doesn't exist to rewrite the codebase. You can update this code to be safer by introducing contemporary input validation, sanitation, and safer database queries.
This article discusses how to implement server side field validation and display customized error messages to the client.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Suggested Courses

572 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question