Question:
I want to write a script that can find changes done in a php file by php?
2009-08-05 12:57:56 UTC
Hi
I want to write a script that can find changes done in a php file, and script can send email of these changes with date and time
Four answers:
?
2009-08-05 14:14:08 UTC
Is your php file under version control?



Search the web for "svn red book" and check out the first chapter on how and why to use version control, especially subversion.



If it is under source control and if the devs are using it properly, then 'svn log' should get you a list of all the changes. If you install Tortoise, you can get a nice GUI with some great diff tools, etc.



It's all free.
Atif Majid
2009-08-09 06:29:53 UTC
I do not think that any script can find the changes in file. For this, you must setup a version control system like SVN. Once you add the latest version of your file in svn, you can get the changes anytime.
has_infoooo
2009-08-05 22:12:17 UTC
salam

a change can be noticed by size of this file so u can use it to knew wich one was changed

$filename = 'example.php';

echo $filename . ': ' . filesize($filename) . ' bytes';

to have thre size of a file

bye for now
arbpen
2009-08-05 20:09:28 UTC
You might want to start here: http://www.php.net/filemtime


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...