skip to main
|
skip to sidebar
About
rss
Contact
YasiruGaminda
home
About You
stock imagery
Drawings
Graphic Designs
web design
Latest
Entries
»
Showing posts with label
php file handling function
.
Show all posts
Showing posts with label
php file handling function
.
Show all posts
Friday, October 23, 2009
Php function for search from a file
If you have the start and end points, you can get the content of that two points. (as a example if the start and end point are
and
then u can get the content of these tags using this function. eg:
content
)
","",$contents);
$t = my_strip("abc","xyz",$contents);
echo $t;
?>
aaa.txt
=====
ntbfjkb n jABCjergnv
fvb j njrbn ntbfjkb n jegnb ef
g45yyyXYZtrgjrgbXYZk oi iABCyji oni jij
output
=====
jergnv fvb j njrbn ntbfjkb n jegnb ef g45yyy
Tuesday, September 29, 2009
sample code for undestand php file handling functions
$comment = $_POST["txtcomment"];
if ($comment!=""){
$date=date('l dS \of F Y h:i:s A');
$massage = $date.": ".$comment."\n";
$file=fopen("comment.txt","a+") or exit("Unable to open file!");
fwrite($file,$massage) or die("Could not write to file");
fclose($file);
echo "Massage sent!";
}
?>
This will write the massage to the comment.txt file.
« Older Posts
Home
Subscribe to:
Posts (Atom)
About Me
yasiru gaminda
Colombo, Sri Lanka
Different but simple person
View my complete profile
Facebook Badge
Yasiru Gaminda
Create Your Badge
Followers
Blog Archive
▼
2010
(19)
▼
November
(1)
solution for prototype.js and jquery.js conflict p...
►
October
(1)
►
September
(1)
►
August
(2)
►
July
(4)
►
May
(4)
►
April
(3)
►
March
(2)
►
January
(1)
►
2009
(11)
►
December
(3)
►
November
(1)
►
October
(1)
►
September
(2)
►
June
(4)
►
2008
(1)
►
October
(1)
Labels
asterisk
(1)
autorun
(1)
c sharp
(1)
c#
(1)
c# and mysql
(1)
centOS
(1)
class diagram
(1)
cmd
(1)
compare databases
(2)
compare object orienterd databases
(1)
database
(2)
databases
(2)
datetime
(1)
DBMS
(1)
DBMS market
(1)
different detabases
(1)
different object oriented databases
(1)
enable javascript
(1)
ER diagram
(2)
hidden files
(1)
http
(1)
IP PBX
(1)
isNumaric()
(1)
javascript
(3)
jquery. prototype
(1)
linux
(2)
magic
(1)
mail validation
(1)
ms office
(1)
mysql
(3)
object oriented databases
(1)
OODB
(1)
open-source
(1)
opensource
(1)
php
(6)
php file handling function
(2)
report writting
(1)
shell script
(1)
sql
(2)
sql injection
(1)
stored procedure
(1)
target market of DBMSs
(1)
UML
(2)
UML diagrams
(2)
usecase
(1)
virus
(1)
widows
(1)
windows
(1)
windows xp autorun
(2)
word
(1)