Re: Re: [PHP] Multiple SQLite statements
On 11 Oct 2011 at 03:03, Paul M Foster wrote: > On Mon, Oct 10, 2011 at 04:14:00PM +0100, Tim Streater wrote: > >> I would like to use the SQLite3 (not PDO) interface to SQLite, and I >> would like to be able to supply a string containing several SQL >> statements and have them all executed, thus saving the overhead of >> several calls. It *appears* that this may be how it actually works, >> but I wondered if anyone could confirm that. > > -- > Cheers -- Tim >> > > The docs appear to agree that this is allowed. See: > > http://us.php.net/manual/en/function.sqlite-exec.php That's the SQLite interface, though, rather than the SQLite3 one. The latter just says: "Executes an SQL query ...". -- Cheers -- Tim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: Re: [PHP] Multiple SQLite statements
Tim Streater wrote: > On 11 Oct 2011 at 03:03, Paul M Foster wrote: > >> On Mon, Oct 10, 2011 at 04:14:00PM +0100, Tim Streater wrote: >> >>> I would like to use the SQLite3 (not PDO) interface to SQLite, and I >>> would like to be able to supply a string containing several SQL >>> statements and have them all executed, thus saving the overhead of >>> several calls. It *appears* that this may be how it actually works, >>> but I wondered if anyone could confirm that. >> >> -- >> Cheers -- Tim >>> >> >> The docs appear to agree that this is allowed. See: >> >> http://us.php.net/manual/en/function.sqlite-exec.php > > That's the SQLite interface, though, rather than the SQLite3 one. The > latter just says: "Executes an SQL query ...". > > -- > Cheers -- Tim Not to be a smartass or anything, but what about TIAS ? Cheers -- David Robley I don't eat snails... I prefer FAST food! Today is Prickle-Prickle, the 65th day of Bureaucracy in the YOLD 3177. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: Re: Re: [PHP] Multiple SQLite statements
On 11 Oct 2011 at 10:47, David Robley wrote: > Tim Streater wrote: > >> On 11 Oct 2011 at 03:03, Paul M Foster wrote: >> >>> On Mon, Oct 10, 2011 at 04:14:00PM +0100, Tim Streater wrote: >>> I would like to use the SQLite3 (not PDO) interface to SQLite, and I would like to be able to supply a string containing several SQL statements and have them all executed, thus saving the overhead of several calls. It *appears* that this may be how it actually works, but I wondered if anyone could confirm that. >>> The docs appear to agree that this is allowed. See: >>> >>> http://us.php.net/manual/en/function.sqlite-exec.php >> >> That's the SQLite interface, though, rather than the SQLite3 one. The >> latter just says: "Executes an SQL query ...". > Not to be a smartass or anything, but what about TIAS ? What that? -- Cheers -- Tim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: Re: Re: [PHP] Multiple SQLite statements
Tim Streater wrote: > On 11 Oct 2011 at 10:47, David Robley wrote: > >> Tim Streater wrote: >> >>> On 11 Oct 2011 at 03:03, Paul M Foster wrote: >>> On Mon, Oct 10, 2011 at 04:14:00PM +0100, Tim Streater wrote: > I would like to use the SQLite3 (not PDO) interface to SQLite, and I > would like to be able to supply a string containing several SQL > statements and have them all executed, thus saving the overhead of > several calls. It *appears* that this may be how it actually works, > but I wondered if anyone could confirm that. > The docs appear to agree that this is allowed. See: http://us.php.net/manual/en/function.sqlite-exec.php >>> >>> That's the SQLite interface, though, rather than the SQLite3 one. The >>> latter just says: "Executes an SQL query ...". > >> Not to be a smartass or anything, but what about TIAS ? > > What that? > > -- > Cheers -- Tim Er, Try It And See A couple of minutes experimentation might have saved you the time of email, wait for an answer ... Cheers -- David Robley Mothers are the necessity of invention -- Calvin Today is Prickle-Prickle, the 65th day of Bureaucracy in the YOLD 3177. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: Re: Re: Re: [PHP] Multiple SQLite statements
On 11 Oct 2011 at 11:25, David Robley wrote: > Tim Streater wrote: >> On 11 Oct 2011 at 10:47, David Robley wrote: >>> Tim Streater wrote: On 11 Oct 2011 at 03:03, Paul M Foster wrote: > On Mon, Oct 10, 2011 at 04:14:00PM +0100, Tim Streater wrote: >> I would like to use the SQLite3 (not PDO) interface to SQLite, and I >> would like to be able to supply a string containing several SQL >> statements and have them all executed, thus saving the overhead of >> several calls. It *appears* that this may be how it actually works, >> but I wondered if anyone could confirm that. > The docs appear to agree that this is allowed. See: > http://us.php.net/manual/en/function.sqlite-exec.php That's the SQLite interface, though, rather than the SQLite3 one. The latter just says: "Executes an SQL query ...". >>> Not to be a smartass or anything, but what about TIAS ? >> What that? > Er, Try It And See > > A couple of minutes experimentation might have saved you the time of email, > wait for an answer ... Well, there is an sqlite3 executable that one can run to do CLI things to a database. OS X comes with that and I was also able to download the source of that program, and the SQLite C amalgamation, and rebuild it myself. It is certainly possible, with that program, to execute a sequence of semi-colon separated statements. It *doesn't* work with PHP's PDO interface to sqlite, as I found in a test program I put together; I haven't properly tested that with the sqlite3 interface. I've tried asking on the sqlite general mailing list and (to me at least), the answers are at best unclear. There is a function, part of the C interface to sqlite, that talks about a sequence of statements, but I guess ultimately it depends on how the writer of the PHP sqlite3 interface implemented it. -- Cheers -- Tim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] newline and return issues in string
I have come across an issue with my string that I would like to find a faster way to resolve. It seems there are new lines and returns at different positions of the string. First I exploded on the new line explode(\n, $ string) This gave me a nice array but when I try to implode I get the new lines again. There is not a consistent position and there seems to be some hidden returns in the array as well. Is there a way, or has someone written a filter that would allow me to remove all the newlines and returns from the array or string. Understand I have resolved this issue but I think I have to be going about this the hard way because it is just too complex . FYI $filter = array("\r\n", "\n", "\r"); str_replace($filter,,$string) ß this is useless in this situation I have tried and it does not change the string at all. Understand the newlines and returns do not display in the string as literals. Meaning you do not see /n or /r it is hidden.
Re: [PHP] newline and return issues in string
On Tue, Oct 11, 2011 at 7:58 AM, wrote: > I have come across an issue with my string that I would like to find a > faster way to resolve. > > It seems there are new lines and returns at different positions of the > string. > > > > First I exploded on the new line explode(“\n”, $ string) > > This gave me a nice array but when I try to implode I get the new lines > again. > > There is not a consistent position and there seems to be some hidden returns > in the array as well. > > > > Is there a way, or has someone written a filter that would allow me to > remove all the newlines and returns from the array or string. > > Understand I have resolved this issue but I think I have to be going about > this the hard way because it is just too complex . > > > > FYI > > $filter = array("\r\n", "\n", "\r"); > > str_replace($filter,’’,$string) ß this is useless in this situation I have > tried and it does not change the string at all. > > Understand the newlines and returns do not display in the string as > literals. Meaning you do not see /n or /r it is hidden. > > > > > > What about using nl2br() and then stripping out all the tags? -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] newline and return issues in string
> -Original Message- > From: Bastien Koert [mailto:phps...@gmail.com] > Sent: Tuesday, October 11, 2011 8:53 AM > To: ad...@buskirkgraphics.com > Cc: php-general@lists.php.net > Subject: Re: [PHP] newline and return issues in string > > On Tue, Oct 11, 2011 at 7:58 AM, wrote: > > I have come across an issue with my string that I would like to find > a > > faster way to resolve. > > > > It seems there are new lines and returns at different positions of > the > > string. > > > > > > > > First I exploded on the new line explode(\n, $ string) > > > > This gave me a nice array but when I try to implode I get the new > lines > > again. > > > > There is not a consistent position and there seems to be some hidden > returns > > in the array as well. > > > > > > > > Is there a way, or has someone written a filter that would allow me > to > > remove all the newlines and returns from the array or string. > > > > Understand I have resolved this issue but I think I have to be going > about > > this the hard way because it is just too complex . > > > > > > > > FYI > > > > $filter = array("\r\n", "\n", "\r"); > > > > str_replace($filter,,$string) ß this is useless in this situation I > have > > tried and it does not change the string at all. > > > > Understand the newlines and returns do not display in the string as > > literals. Meaning you do not see /n or /r it is hidden. > > > > > > > > > > > > > > What about using nl2br() and then stripping out all the tags? > > -- > > Bastien > > Cat, the other other white meat I tried that but same issue -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] newline and return issues in string
On 11 October 2011 12:58, wrote: > I have come across an issue with my string that I would like to find a > faster way to resolve. > > It seems there are new lines and returns at different positions of the > string. > > > > First I exploded on the new line explode(“\n”, $ string) > > This gave me a nice array but when I try to implode I get the new lines > again. > > There is not a consistent position and there seems to be some hidden returns > in the array as well. > > > > Is there a way, or has someone written a filter that would allow me to > remove all the newlines and returns from the array or string. > > Understand I have resolved this issue but I think I have to be going about > this the hard way because it is just too complex . > > > > FYI > > $filter = array("\r\n", "\n", "\r"); > > str_replace($filter,’’,$string) ß this is useless in this situation I have > tried and it does not change the string at all. You don't want to remove them. You want to replace them with a constant. $lines = explode(PHP_EOL, str_replace($filter, PHP_EOL, $string)); for example. -- Richard Quadling Twitter : EE : Zend : PHPDoc @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY : bit.ly/lFnVea -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] newline and return issues in string
On 10/11/2011 04:44 PM, Richard Quadling wrote: On 11 October 2011 12:58, wrote: I have come across an issue with my string that I would like to find a faster way to resolve. It seems there are new lines and returns at different positions of the string. First I exploded on the new line explode(“\n”, $ string) This gave me a nice array but when I try to implode I get the new lines again. There is not a consistent position and there seems to be some hidden returns in the array as well. Is there a way, or has someone written a filter that would allow me to remove all the newlines and returns from the array or string. Understand I have resolved this issue but I think I have to be going about this the hard way because it is just too complex . FYI $filter = array("\r\n", "\n", "\r"); str_replace($filter,’’,$string) ß this is useless in this situation I have tried and it does not change the string at all. You don't want to remove them. You want to replace them with a constant. $lines = explode(PHP_EOL, str_replace($filter, PHP_EOL, $string)); for example. try to implement a string builder using array or arrayobject and on insert; filter / replace your text / characters using regex, -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: newline and return issues in string
On 10/11/2011 7:58 AM, ad...@buskirkgraphics.com wrote: I have come across an issue with my string that I would like to find a faster way to resolve. It seems there are new lines and returns at different positions of the string. First I exploded on the new line explode(“\n”, $ string) This gave me a nice array but when I try to implode I get the new lines again. There is not a consistent position and there seems to be some hidden returns in the array as well. Is there a way, or has someone written a filter that would allow me to remove all the newlines and returns from the array or string. Understand I have resolved this issue but I think I have to be going about this the hard way because it is just too complex . FYI $filter = array("\r\n", "\n", "\r"); str_replace($filter,’’,$string) ß this is useless in this situation I have tried and it does not change the string at all. Understand the newlines and returns do not display in the string as literals. Meaning you do not see /n or /r it is hidden. Try this: $strippedStr= preg_replace("%(\n|\r)%", "#", $string); The "#" will let your see what's happening. Change it to simply "". for the final version. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] newline and return issues in string
> -Original Message- > From: Richard Quadling [mailto:rquadl...@gmail.com] > Sent: Tuesday, October 11, 2011 9:44 AM > To: ad...@buskirkgraphics.com > Cc: php-general@lists.php.net > Subject: Re: [PHP] newline and return issues in string > > On 11 October 2011 12:58, wrote: > > I have come across an issue with my string that I would like to find > a > > faster way to resolve. > > > > It seems there are new lines and returns at different positions of > the > > string. > > > > > > > > First I exploded on the new line explode(“\n”, $ string) > > > > This gave me a nice array but when I try to implode I get the new > lines > > again. > > > > There is not a consistent position and there seems to be some hidden > returns > > in the array as well. > > > > > > > > Is there a way, or has someone written a filter that would allow me > to > > remove all the newlines and returns from the array or string. > > > > Understand I have resolved this issue but I think I have to be going > about > > this the hard way because it is just too complex . > > > > > > > > FYI > > > > $filter = array("\r\n", "\n", "\r"); > > > > str_replace($filter,’’,$string) ß this is useless in this situation I > have > > tried and it does not change the string at all. > > You don't want to remove them. You want to replace them with a > constant. > > $lines = explode(PHP_EOL, str_replace($filter, PHP_EOL, $string)); > > for example. > > > > > > -- > Richard Quadling > Twitter : EE : Zend : PHPDoc > @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY : bit.ly/lFnVea Richard I am not sure I understand what that is doing it made things 300% worse. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: newline and return issues in string
Richard L. Buskirk Senior Software Engineer/Systems Administrator You cant grow your business with systems that are on life support... > -Original Message- > From: Al [mailto:n...@ridersite.org] > Sent: Tuesday, October 11, 2011 10:17 AM > To: php-general@lists.php.net > Subject: [PHP] Re: newline and return issues in string > > > > On 10/11/2011 7:58 AM, ad...@buskirkgraphics.com wrote: > > I have come across an issue with my string that I would like to find > a > > faster way to resolve. > > > > It seems there are new lines and returns at different positions of > the > > string. > > > > > > > > First I exploded on the new line explode(\n, $ string) > > > > This gave me a nice array but when I try to implode I get the new > lines > > again. > > > > There is not a consistent position and there seems to be some hidden > returns > > in the array as well. > > > > > > > > Is there a way, or has someone written a filter that would allow me > to > > remove all the newlines and returns from the array or string. > > > > Understand I have resolved this issue but I think I have to be going > about > > this the hard way because it is just too complex . > > > > > > > > FYI > > > > $filter = array("\r\n", "\n", "\r"); > > > > str_replace($filter,,$string) ß this is useless in this situation I > have > > tried and it does not change the string at all. > > > > Understand the newlines and returns do not display in the string as > > literals. Meaning you do not see /n or /r it is hidden. > > > > > > > > > > > > > > Try this: > > $strippedStr= preg_replace("%(\n|\r)%", "#", $string); > > The "#" will let your see what's happening. Change it to simply "". for > the > final version. > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php PERFECT Thank you so much for that -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: newline and return issues in string
On 10/11/2011 10:44 AM, ad...@buskirkgraphics.com wrote: Richard L. Buskirk Senior Software Engineer/Systems Administrator You can’t grow your business with systems that are on life support... -Original Message- From: Al [mailto:n...@ridersite.org] Sent: Tuesday, October 11, 2011 10:17 AM To: php-general@lists.php.net Subject: [PHP] Re: newline and return issues in string On 10/11/2011 7:58 AM, ad...@buskirkgraphics.com wrote: I have come across an issue with my string that I would like to find a faster way to resolve. It seems there are new lines and returns at different positions of the string. First I exploded on the new line explode(“\n”, $ string) This gave me a nice array but when I try to implode I get the new lines again. There is not a consistent position and there seems to be some hidden returns in the array as well. Is there a way, or has someone written a filter that would allow me to remove all the newlines and returns from the array or string. Understand I have resolved this issue but I think I have to be going about this the hard way because it is just too complex . FYI $filter = array("\r\n", "\n", "\r"); str_replace($filter,’’,$string) ß this is useless in this situation I have tried and it does not change the string at all. Understand the newlines and returns do not display in the string as literals. Meaning you do not see /n or /r it is hidden. Try this: $strippedStr= preg_replace("%(\n|\r)%", "#", $string); The "#" will let your see what's happening. Change it to simply "". for the final version. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php PERFECT Thank you so much for that I don't know why so many go to awful extremes to avoid using the preg functions. Rarely, does their overhead have a measurable affect on overall execution times. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: files outside of documentRoot
Hi! i'm was checking, readfile(); and fpassthru(); With easy examples, i can use it for show a pic in the screen and download a file, from outside of documentRoot. It works fine. The problem that i have now, is, i need can work with it, inside of other documents, but i'm getting all time error by the headers. ( already sendt ... ) Anyone knows how to use it for can call the files and work together with other page ¿? Thanks On Sun, Oct 9, 2011 at 6:57 PM, Sean Greenslade wrote: > > On Sun, Oct 9, 2011 at 9:52 AM, Ricardo Martinez wrote: > >> The files are, png, pdf and flv. >> >> Only users login can see or download it. >> >> thx ;> >> >> On Sat, Oct 8, 2011 at 11:16 PM, Shawn McKenzie > >wrote: >> >> > On 10/08/2011 03:40 PM, Ricardo Martinez wrote: >> > > Hi List! >> > > >> > > I need to access files outside the DocumentRoot. >> > > >> > > I've been looking for info and documentation, and I've read that it >> can >> > be >> > > done using symbolic links and another way is by using headers. >> > > >> > > I want to know, what do you think, what is the best way, and if anyone >> > knows >> > > a good doc about of it. >> > > >> > > Thanks!!! >> > > >> > >> > It depends on what you mean by "files". Are they PHP files that need to >> > be run, or images, or files that need to be downloaded by the user? >> > >> > For PHP, you would add the external dir to your include path. >> > >> > For images you can use a php file as the img src and that file sets the >> > appropriate headers and uses readfile() to get and echo the image data: >> > getimage.php?image=someimage.gif >> > >> > For download files you would do it in the same manner as for images: >> > download.php?file=somefile.zip >> > >> > >> > -- >> > Thanks! >> > -Shawn >> > http://www.spidean.com >> > >> >> -- >> Ricardo >> ___ >> IT Architect >> website: http://www.pulsarinara.com >> > > > Sounds like the downloader php script would be perfect (what Shawn > suggested). Have the script check the login status, then (if valid) send the > proper headers for the file and read out the data with the script. > > -- > --Zootboy > > Sent from my PC. > > -- Ricardo ___ IT Architect website: http://www.pulsarinara.com
Re: [PHP] Re: files outside of documentRoot
On Tue, Oct 11, 2011 at 11:00 AM, Ricardo Martinez wrote: > Hi! > > i'm was checking, readfile(); and fpassthru(); > > With easy examples, i can use it for show a pic in the screen and download a > file, from outside of documentRoot. It works fine. > > The problem that i have now, is, i need can work with it, inside of other > documents, but i'm getting all time error by the headers. ( already sendt > ... ) > > Anyone knows how to use it for can call the files and work together with > other page ¿? > > Thanks > > On Sun, Oct 9, 2011 at 6:57 PM, Sean Greenslade wrote: > >> >> On Sun, Oct 9, 2011 at 9:52 AM, Ricardo Martinez wrote: >> >>> The files are, png, pdf and flv. >>> >>> Only users login can see or download it. >>> >>> thx ;> >>> >>> On Sat, Oct 8, 2011 at 11:16 PM, Shawn McKenzie >> >wrote: >>> >>> > On 10/08/2011 03:40 PM, Ricardo Martinez wrote: >>> > > Hi List! >>> > > >>> > > I need to access files outside the DocumentRoot. >>> > > >>> > > I've been looking for info and documentation, and I've read that it >>> can >>> > be >>> > > done using symbolic links and another way is by using headers. >>> > > >>> > > I want to know, what do you think, what is the best way, and if anyone >>> > knows >>> > > a good doc about of it. >>> > > >>> > > Thanks!!! >>> > > >>> > >>> > It depends on what you mean by "files". Are they PHP files that need to >>> > be run, or images, or files that need to be downloaded by the user? >>> > >>> > For PHP, you would add the external dir to your include path. >>> > >>> > For images you can use a php file as the img src and that file sets the >>> > appropriate headers and uses readfile() to get and echo the image data: >>> > getimage.php?image=someimage.gif >>> > >>> > For download files you would do it in the same manner as for images: >>> > download.php?file=somefile.zip >>> > >>> > >>> > -- >>> > Thanks! >>> > -Shawn >>> > http://www.spidean.com >>> > >>> >>> -- >>> Ricardo >>> ___ >>> IT Architect >>> website: http://www.pulsarinara.com >>> >> >> >> Sounds like the downloader php script would be perfect (what Shawn >> suggested). Have the script check the login status, then (if valid) send the >> proper headers for the file and read out the data with the script. >> >> -- >> --Zootboy >> >> Sent from my PC. >> >> > > > -- > Ricardo > ___ > IT Architect > website: http://www.pulsarinara.com > For images and the like, I have a separate page that is called that handles the image and the headers needed In the page I have some thing like echo ""; Then in the get-image.php page i have the code that gets the image from the db, outputs the appropriate headers and then outputs the image -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Problem with base64_encode and openssl_verify
openssl_sign($dados, $signature, $pkeyid)); // return 1 $signatureValue = base64_encode($signature); $funcionam = base64_decode($dados_que_nao); $pubKey = file_get_contents('protected/models/nfe/certs/cert.pem'); openssl_verify($funcionam,$signature, $pubKey)); // return 0; if I remove the de base64 encrypt and decrypt. It works fine. Can someone helpme with this?
[PHP] How to know the path of `php.ini` used when call php.exe from CLI/command-line in Windows 7
Hi every one, Currently when I call php --ini from CLI, I just see C:\Windows but search for this location, I cannot find any php.ini files. I'm stuck there - where is the php.ini file used by php.exe called from CLI as below *C:> php --ini* Hope to hear from you! Regards, Nam
Re: [PHP] How to know the path of `php.ini` used when call php.exe from CLI/command-line in Windows 7
On Tue, Oct 11, 2011 at 14:40, Nam Gi VU wrote: > Hi every one, > Currently when I call php --ini from CLI, I just see C:\Windows but search > for this location, I cannot find any php.ini files. > I'm stuck there - where is the php.ini file used by php.exe called from CLI > as below > > *C:> php --ini* If there's no php.ini file in the path it's checking, it'll just use the internal defaults. You may not have a php.ini file anywhere on your system, which is okay if you don't need to do any tuning. -- Network Infrastructure Manager http://www.php.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Server Side Include translator as PHP functions
On Sat, Oct 8, 2011 at 10:36 AM, Complex wrote: > Can you please tell me if there's already a set of PHP functions for > translating SSI commands to PHP? > I'm looking to do two things -- one difficult, one easy -- using PHP > on a hosted server. I can't believe that this hasn't already been done -- there are probably lots of sites that used SSI in legacy systems that eventually went to PHP that something like this only makes sense as an interim step. Yet I can't find anything (or it's buried too deep in google that my -fu isn't working). Basically what you want to do is translate SSI directives on the fly in PHP, yes? includes, execs, other SSI functions. I can't see an easy way to this without actually reading the file and making substitutions in it as you spit it out to the client. It doesn't seem like especially difficult code to write, it's just surprising I can't find something that already does it. I did this a long time ago in Perl, but that code is lost to time. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Server Side Include translator as PHP functions
On Sun, Oct 9, 2011 at 12:36 PM, Tedd Sperling wrote: > On Oct 9, 2011, at 11:41 AM, Complex wrote: > >> Tedd, >> >> The crucial detail you're lookign for is my lack of choice or control >> in the matter, for all sorts of reasons that are actually quite stupid >> but not possible for *me* to change, and not possible for anyone else >> to change quickly. Thus I am looking for a solution to the problem at >> hand, instead of a suggestion for what the entire org should be doing >> instead. I know what they should be doing instead, but that's not my >> decision. It's not like I'm building a new website this way; I'm >> trying to move forwards with an existing and large website. The more >> different code-bases we have for different parts of the site, the >> harder it will be to actually change to something else (PHP-based, I >> pray). >> >> -- >> PHP General Mailing List (http://www.php.net/) >> To unsubscribe, visit: http://www.php.net/unsub.php >> > > Without debating the question of choice, if I was confronted with a large web > site that used SSI, I would inform the client of such and put together a bid > as to my time to bring the site up to date. If not, then I think I would pass > on working the site. In my experience, it's not worth my additional time to > try to work around "out of date" technologies. > > It is also been my experience that when I am confronted with something large > scale, and when approved by the client, I simply do a site-wide find and > replace (namely change "