|
|
|
Sometimes you need to find wich line you have changed in a script and you don't have cvs or any tool other than PHP ? So this is a fast way that to find changed line and the content of each one.
|
<?php
/**
*
* @author Ben Yacoub Hatem <info at phptunisie.net>
* $ version 1.0.0 Sun Oct 24 23:01:22 CEST 2004 23:01:22 by hatem
*/
$file1 = "data1.php.orig";
$file2 = "data1.php";
$data1 = file($file1);
$data2 = file($file2);
foreach ($data1 as $k=>$v) {
if (trim($data2[$k])!=trim($v)) {
echo "line $k => $v | $data2[$k]\n<br>";
}
}
?> | | |
|
| Bs_IniHandler is a class that can read and write ini-style files (and strings) Categories : PHP, Filesystem, PHP Classes | | | GuestBook Light - a plug and play application for any website. Categories : PHP, Complete Programs, Filesystem, Sessions | | | Class that allows the PHP developer to create and manage UNIX like password files suitable for use as Apache authentication password files.
Categories : HTTP, PHP, PHP Classes, Filesystem | | | How to create an empty file? (touch) Categories : Filesystem, PHP | | | Relative Path Categories : PHP, Filesystem | | | How to overide the Max_file_size barier Categories : PHP, PHP Configuration, Filesystem | | | A File Browser Class.To Read Drives,Directories and Files .Files writing is also possible Categories : PHP, PHP Classes, Filesystem | | | Open directory and File download Categories : PHP, Filesystem, Directories, HTML and PHP | | | 3 lines of Code to extract Tar, Zip, Gzip etc.. Categories : PHP, Filesystem, PHP Classes, Compression | | | List the content of the directory of your webserver where this small PHP Script resides. Categories : PHP, Filesystem, Directories, CSS | | | Link Submition - Allow your visitors to submit links to the site. Categories : PHP, Arrays, Filesystem, Beginner Guides | | | file class , uploade file , download file already uploaded on another website Categories : PHP, PHP Classes, Filesystem, Web Services | | | Remote Archive (Zip, Tar, Gzip) downloader with FTP and local extration support Categories : PHP, FTP, Filesystem, PHP Classes, Compression | | | Using php3 to upload files, uploading files, file uploads. Categories : PHP, Filesystem, HTTP | | | Remote File Saving with PHP - Download and serve a remote file. The content of the file will be updated at fixed intervals. Categories : PHP, Filesystem, Cache, Sockets, HTTP | |
|
|