[thelist] Possible PHP workaround?
jon steele
jjsteele22 at yahoo.com
Wed Nov 14 17:09:25 CST 2001
You could probably write your own little script... what I would do in
your place :)
Maybe not too elegant, but it'll get the job done. Something like:
$dh=opendir('.');
$count=1;
while (false !== ($file = readdir($dh))) {
if($count<2){$count++;}else{
//read
$fp=fopen($file,'r');
$contents=fread($fp,filesize($file));
fclose($fp);
//write
$towrite="#!/usr/local/bin/php".chr(10).chr(13).$contents;
$fp=fopen($file,'w');
fwrite($fp,$contents);
fclose($fp);
}
}
closedir($dh);
--- "McCoy, Alan" <amccoy at goodmanct.com> wrote:
> One of our clients is hosted at Interland, where they run PHP as a
> module on their server. So, in order for me to use PHP, all my
> scripts
> have to make a call to the module using:
>
> #!/usr/local/bin/php
>
> While I don't really have a problem with this, I need to add this
> line
> to the 50 or so php scripts that will be on the site. I suppose I
> could
> do a find/replace, but it has to go at the top of the file. Is there
> a
> way to specify this in a find/replace string?
>
> If not, is there a known workaround for the call to the module?
>
> Alan
>
> ---------------------------------------
> For unsubscribe and other options, including
> the Tip Harvester and archive of TheList go to:
> http://lists.evolt.org Workers of the Web, evolt !
__________________________________________________
Do You Yahoo!?
Find the one for you at Yahoo! Personals
http://personals.yahoo.com
More information about the thelist
mailing list