Is there a way to Edit more than 1 php file at a time? I have about 25 files that i want to edit the same line of code on each of those files. I really do not know very much php so it would have to be something very simple or possibly some type of software. any ideas or suggestions?
I don't know of a program that will do that off hand but in the future you might want to go through those files and where that line is at place a function and an include command on top of it. For example include("example.php"); //the function with the line func(); PHP: That way you will never have to go to each page ever again. You just have to change the line in that one function. Look at also require() and require_once().
For better understanding of the include function, you could basically use it for... lets say, a nav menu (nav.php). Setup a basic template that you will not need to alter on 25 pages, and inside the html include the nav page with include('nav.php'). Then any changes you need made to the nav page, all other 25 pages are automatically changed since the include function pulls in the same nav.php each time the page is loaded.
1. put all your php files in the same folder; 2. download pspad: http://www.pspad.com/en/download.php; 3. open pspad and Projects->Create project from directory 4. search->Search/Replace in files... But, as the others said, it's much easier to use include 'filename.ext'
write a simple shell/sed script. Loop thru all the files and apply the edit using sed This is a pretty simple shell script and the easiest way to work with what you currently have. Here is a simple shell script that will do what you need #!/bin/bash for ZZZ in `grep asdf *|cut -f1 -d:` do sed -i ' s/asdf/fdsa/g' $ZZZ done Code (markup): the above example will find all files with asdf in them within the current directory, then replace it with fdsa 4 line shell script is the easiest way to do this trivial task.
i use PSPAD this is best tool i have ever seen It also works great for many other languages Regards Alex
in linux, go to the directory where your files are repalce 'oldstring' 'newstring' -- *.php Code (markup):
like octalsystems said, but if dreamweaver is too expensive for you, you can use UltraEdit (for windows user)