I have a project that includes 49 folders, each one has a file called index.php
All index.php files are almost the same except for one part that changes depending on the folder it is in.
<?php include_once("/home/bgarch/public_html/galleryheader.html"); ?>
<?php include_once("/home/bgarch/public_html/culture/loadscripts.html"); ?>
</head>
<body>
<div class="header">
<?php include_once("/home/bgarch/public_html/header.html"); ?>
</div>
<div class="clear"></div>
<div class="displaywrapper">
<?php include_once("content.html"); ?>
</div></div>
<div class="clear"></div>
<?php include_once("/home/bgarch/public_html/footer.html"); ?>
In the second line where the above reads: "../culture/.." the word culture is the variable and is different based on the folder it is in.
What I need to do know is do a "Find/Replace all in project" that automatically replaces all the text inside each 'index.php' file with the following"
<?php include_once("http://www.bgarchitect.co.nz/subPage/index.php"); ?>
I have spent the past 2 hours trying to figure out regular expressions to acomplish this but have been unsuccessful so far. Maybe it is not possible to do so?
Anyway, I thought I'd ask a question here in hopes it is in fact much easier than I anticipated. So any help/pointer/hints or tricks are much appreciated.
Thanks for reading, Jannis