Hi, I have 2 main php questions and a few sub questions :-)
1. I have Dreamweaver/EditPlus and Zend developer (some full versions some trial) (am open to trying out other tools)
Is there anyway to do a find/replace on a particular variable in a whole directory? (or all files that refer/use that variable) eg: find $GuessableVariable and replace it with $HardToGuessVariable
or do i have to go file by file and do a search?
2. I have visited many sites which use ASP/JSP and PHP which instead of calling *differient* pages like so: http://somesite.com/pageName.php?s=blah http://somesite.com/DifferientPageName.php?s=blah2
(thats the way i generally program)
keep calling the *same* page with numbers, like so: http://somesite.com/pageName.php?s=333 then http://somesite.com/pageName.php?s=334 http://somesite.com/pageName.php?s=253 etc
Whats the advantage of the above and whats the idea? isnt it much easier (and logical) to keep track of pages if you give them a logical name?
giving a page: loginClient.php is much easier than remembering script.php?val=214
right? Or am I missing something?
Thanks, -Ryan http://Bestwebhosters.com
Hi ryan,
I have a search replace tool which i'll send to you, you can add all php files to it and do a search replace on all of them at once, very simple.
and as for the 2nd question when I build sites I use the index.php?page=contact etc type method, the point is to have one file with your navigation/header/footer in so you can make one change to these common parts for all pages.
e.g.
index.php?page=contact
would be as follows
********* //header //navigation
switch(page) { case contact: include("contact.php"); break; }
//footer *********
whereas when you call a different file for each page it is more like this...
********* include("header.php");
// code & content here
include("footer.php"); *********
or at least thats how I do it : )
Regards G.Solomon
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php