Re: [PHP] question about php with sql database

2008-03-18 Thread Brady Mitchell
On Mar 18, 2008, at 1008PM, Sudhakar wrote: 1. are the connection statements ex = $conn = mysql_connect($hostname, $user, $dbpassword); etc does these remain the same or are they different. http://php.net/mssql 2. unlike in mysql with phpmyadmin which is browser based to access databases

Re: [PHP] question about php with sql database

2008-03-18 Thread Chris
Sudhakar wrote: instead of using mysql database which is conventionally used as database with php, if sql server database is used with php are there any major differences to keep in mind. In syntax or what? Yes there are differences between the two as far as sql syntax goes. 1. are the conn

[PHP] question about php with sql database

2008-03-18 Thread Sudhakar
instead of using mysql database which is conventionally used as database with php, if sql server database is used with php are there any major differences to keep in mind. 1. are the connection statements ex = $conn = mysql_connect($hostname, $user, $dbpassword); etc does these remain the same or

Re: [PHP] Re: Closures

2008-03-18 Thread Robert Cummings
On Tue, 2008-03-18 at 22:56 -0500, Shawn McKenzie wrote: > Ray Hauge wrote: > > I've been reading up on some of the parts of PHP that has been suggested > > could be improved so that I could be more well informed. One of the > > more "interesting" (for lack of a better word) suggestions is closur

Re: [PHP] Is this the best way?

2008-03-18 Thread Shawn McKenzie
Why is Jason schreefing again? Jochem Maas wrote: > Jason Pruim schreef: >> >> On Mar 18, 2008, at 3:20 PM, Jochem Maas wrote: >> >>> what started out as a simple little reply bloated out into an >>> inpromptu brain >>> fart ... lots of bla .. enjoy :-) >>> >>> Jason Pruim schreef: Hi everyon

[PHP] Re: Closures

2008-03-18 Thread Shawn McKenzie
Ray Hauge wrote: > I've been reading up on some of the parts of PHP that has been suggested > could be improved so that I could be more well informed. One of the > more "interesting" (for lack of a better word) suggestions is closures. > I've used closures primarily in JavaScript, and they are ha

Re: [PHP] Fastest way to get table records' number

2008-03-18 Thread Nathan Nobbe
On Tue, Mar 18, 2008 at 11:43 PM, Shelley <[EMAIL PROTECTED]> wrote: > Hi all, > > What do you think is the FASTEST sql to get the total number of a table > with millions of records? when you say 'total number' do you mean the total number of records? in that case assuming the table has a field

[PHP] Fastest way to get table records' number

2008-03-18 Thread Shelley
Hi all, What do you think is the FASTEST sql to get the total number of a table with millions of records? -- Regards, Shelley (http://phparch.cn) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Closures

2008-03-18 Thread Nathan Nobbe
On Tue, Mar 18, 2008 at 10:49 PM, Ray Hauge <[EMAIL PROTECTED]> wrote: > Nathan Nobbe wrote: > > if we were going to see support for anything anonymous that i would > > welcome it would be anonymous objects and the ability to create an > > object on the fly from an interface as per java 5. > > I'm

Re: [PHP] Closures

2008-03-18 Thread Ray Hauge
Nathan Nobbe wrote: if we were going to see support for anything anonymous that i would welcome it would be anonymous objects and the ability to create an object on the fly from an interface as per java 5. I'm not sure if this would solve your problem (my lack of java knowledge is showing),

Re: [PHP] Is this the best way?

2008-03-18 Thread Jochem Maas
Jason Pruim schreef: On Mar 18, 2008, at 3:20 PM, Jochem Maas wrote: what started out as a simple little reply bloated out into an inpromptu brain fart ... lots of bla .. enjoy :-) Jason Pruim schreef: Hi everyone, I am attempting to add a little error checking for a very simple login syst

Re: [PHP] General use of rewrite / redirect

2008-03-18 Thread Nathan Nobbe
On Tue, Mar 18, 2008 at 9:45 PM, Larry Garfield <[EMAIL PROTECTED]> wrote: > Take for instance Drupal (which I use as an example because I'm a core dev > for > it). thats pretty cool. > I will say in general you should not ever have more than one redirect > chained > together. While there may

Re: [PHP] General use of rewrite / redirect

2008-03-18 Thread Larry Garfield
On Tuesday 18 March 2008, Jason Pruim wrote: > I don't know much about the actual load stuff... but I do know unless > you specifically set it, the CSS should be cached unless you refresh > it and the date has changed on the file. I assume the same with the > images as well. True, but bear in min

Re: [PHP] General use of rewrite / redirect

2008-03-18 Thread Larry Garfield
On Tuesday 18 March 2008, Aschwin Wesselius wrote: > Point is: why hitting you webserver with multiple requests per user, > just after submitting a form or whatever caused the redirect? If you > have 2 users per day, that won't hurt. But if you have 30.000 concurrent > users a minute, that could b

[PHP] mysqli_stmt_bind_result

2008-03-18 Thread Jeremy Mcentire
If I use mysqli's prepared statements in an object and call mysqli_stmt_bind_params, into which scope does mysqli_stmt_fetch() place the variables? Can I control it? As of yet, I have no idea where fetch() stores the results. It is fetching valid data. I'd really like to use the OO styl

Re: [PHP] Objects as array key names??

2008-03-18 Thread Nathan Nobbe
another developer brought to my attention the spl method spl_object_hash() method which afforded a mod in the previously posted class whereby foreach could be used properly. also, it allows a more efficient internal implementation. however, to my dismay, it appears that implementing ArrayAccess d

Re: [PHP] General use of rewrite / redirect

2008-03-18 Thread Nathan Nobbe
im sorry i havent read through all the replies, but i have read through several of them. i essentially agree w/ Aschwin here. redirects have been the bane of my existence in several source bases ive worked on. to borrow a phrase (read in closures article mentioned in another thread) they really

Re: [PHP] Closures

2008-03-18 Thread Nathan Nobbe
On Tue, Mar 18, 2008 at 12:07 PM, Ray Hauge <[EMAIL PROTECTED]> wrote: > I've been reading up on some of the parts of PHP that has been suggested > could be improved so that I could be more well informed. One of the > more "interesting" (for lack of a better word) suggestions is closures. > I've

[PHP] Some Good News

2008-03-18 Thread Daniel Brown
Hey, folks; [Skip to the bottom if you just want to get to the point.] As you may have noticed, I was about ready to stop selling shared hosting to the public as of yesterday due to the level of fraud and the costs associated with dealing with such. Most of it emanates from phishers

Re: [PHP] SOAP Server in PHP4

2008-03-18 Thread Nathan Nobbe
On Tue, Mar 18, 2008 at 5:28 PM, Eric Gorr <[EMAIL PROTECTED]> wrote: > Looks like I will be unable to use PHP5 to do a SOAP server. I believe > it was possible to do such a thing in PHP4, but perhaps not as > cleanly. is this because you arent able to use php5 in your current situation, because

Re: [PHP] Problems posting xml file with curl and php

2008-03-18 Thread Nathan Nobbe
On Tue, Mar 18, 2008 at 5:22 PM, Michael Horowitz < [EMAIL PROTECTED]> wrote: > Not much documentation there. How would this function be integrated > with curl. my quick google doesn't show much discussion of this function. i think this should be easier for you, http_post_data(), however its a

[PHP] SOAP Server in PHP4

2008-03-18 Thread Eric Gorr
Looks like I will be unable to use PHP5 to do a SOAP server. I believe it was possible to do such a thing in PHP4, but perhaps not as cleanly. Unfortunately, I am unable to locate the appropriate documentation on php.net for some reason...perhaps I am just blind. Can anyone point me to it?

Re: [PHP] Problems posting xml file with curl and php

2008-03-18 Thread Michael Horowitz
Not much documentation there. How would this function be integrated with curl. my quick google doesn't show much discussion of this function. Michael Horowitz Your Computer Consultant http://yourcomputerconsultant.com 561-394-9079 Nathan Nobbe wrote: On Tue, Mar 18, 2008 at 4:37 PM, Michael

Re: [PHP] Problems posting xml file with curl and php

2008-03-18 Thread Nathan Nobbe
On Tue, Mar 18, 2008 at 4:37 PM, Michael Horowitz < [EMAIL PROTECTED]> wrote: > I've actually tried that and it didn't work for the server I am sending > it to. Is there a way to post just the xml without turning it into an > array or is this the only way. i dont know how to do it w/ the standa

Re: [PHP] Problems posting xml file with curl and php

2008-03-18 Thread Michael Horowitz
I've actually tried that and it didn't work for the server I am sending it to. Is there a way to post just the xml without turning it into an array or is this the only way. Nathan Nobbe wrote: On Tue, Mar 18, 2008 at 4:26 PM, michaelh613 <[EMAIL PROTECTED] > wro

Re: [PHP] Problems posting xml file with curl and php

2008-03-18 Thread Nathan Nobbe
On Tue, Mar 18, 2008 at 4:26 PM, michaelh613 < [EMAIL PROTECTED]> wrote: > > I have created a XML string using PHP DOM. However when I send it to a > third > party using curl it shows up as part of an array and cannot be read. How > should I be using curl to post a xml file. > > My code is below

[PHP] Problems posting xml file with curl and php

2008-03-18 Thread michaelh613
I have created a XML string using PHP DOM. However when I send it to a third party using curl it shows up as part of an array and cannot be read. How should I be using curl to post a xml file. My code is below [code] asXML(); $ch= curl_init(); curl_setopt($ch, CURLOPT_HTTPHEADER, Array("Content

Re: [PHP] Is this the best way?

2008-03-18 Thread Jason Pruim
On Mar 18, 2008, at 12:26 PM, TG wrote: Somehow it is getting to this statement and the variable that you are using just before the ORDER BY part is empty, Why don't you show us that statement. Requested statement below: $query = "SELECT * from ".$linkauth['table']." order by ".$sortOrder

Re: [PHP] Is this the best way?

2008-03-18 Thread Jason Pruim
On Mar 18, 2008, at 3:20 PM, Jochem Maas wrote: what started out as a simple little reply bloated out into an inpromptu brain fart ... lots of bla .. enjoy :-) Jason Pruim schreef: Hi everyone, I am attempting to add a little error checking for a very simple login system. The info is stor

Re: [PHP] Is this the best way?

2008-03-18 Thread Jochem Maas
what started out as a simple little reply bloated out into an inpromptu brain fart ... lots of bla .. enjoy :-) Jason Pruim schreef: Hi everyone, I am attempting to add a little error checking for a very simple login system. The info is stored in a MySQL database, and I am using mysqli to con

Re: [PHP] Is this the best way?

2008-03-18 Thread TG
> > Somehow it is getting to this statement and the variable that you > > are using just before the ORDER BY part is empty, Why don't you > > show us that statement. > > Requested statement below: > > $query = "SELECT * from ".$linkauth['table']." order by ".$sortOrder; > > The $linkauth['

[PHP] Closures

2008-03-18 Thread Ray Hauge
I've been reading up on some of the parts of PHP that has been suggested could be improved so that I could be more well informed. One of the more "interesting" (for lack of a better word) suggestions is closures. I've used closures primarily in JavaScript, and they are handy in that context,

Re: [PHP] General use of rewrite / redirect

2008-03-18 Thread Stut
On 18 Mar 2008, at 15:33, Per Jessen wrote: Stut wrote: One minor thing... a 303 redirect is permanent. In this situation you want to use a 302 otherwise you could potentially cause problems with proxies. A redirect following a POST really should be a 303 - RFC 2616 : 10.3.4 303 See Other T

Re: [PHP] General use of rewrite / redirect

2008-03-18 Thread Per Jessen
Stut wrote: > One minor thing... a 303 redirect is permanent. In this situation you > want to use a 302 otherwise you could potentially cause problems with > proxies. A redirect following a POST really should be a 303 - RFC 2616 : 10.3.4 303 See Other The response to the request can be found un

Re: [PHP] __halt_compiler()

2008-03-18 Thread Philip Thompson
On Mar 17, 2008, at 10:34 AM, Mikey wrote: Shawn McKenzie wrote: Daniel Brown wrote: On Sun, Mar 16, 2008 at 4:18 PM, Casey <[EMAIL PROTECTED]> wrote: Hi list! __halt_compiler(). Does anyone use it? I've used it obsessively in my past two "projects" to store data (specifically CSV) in the

Re: [PHP] General use of rewrite / redirect

2008-03-18 Thread Thijs Lensselink
Quoting Aschwin Wesselius <[EMAIL PROTECTED]>: Per Jessen wrote: header(location) mechanisms do come with a very huge disadvantage if you don't use them with caution. Requests are reinitialised, libraries loaded (again), DB connections setup/checked again, session lookups are being done, log

Re: [PHP] General use of rewrite / redirect

2008-03-18 Thread Stut
On 18 Mar 2008, at 14:49, Jason Pruim wrote: On Mar 18, 2008, at 10:11 AM, Per Jessen wrote: Per Jessen wrote: My typical setup for a form-page probably looks like this: if ( $_POST ) { // do POST processing header(303 thankyou.html). exit } If I wanted the user back on the

Re: [PHP] General use of rewrite / redirect

2008-03-18 Thread Stut
On 18 Mar 2008, at 14:08, Aschwin Wesselius wrote: Per Jessen wrote: header(location) mechanisms do come with a very huge disadvantage if you don't use them with caution. Requests are reinitialised, libraries loaded (again), DB connections setup/checked again, session lookups are being done

Re: [PHP] General use of rewrite / redirect

2008-03-18 Thread Jason Pruim
On Mar 18, 2008, at 10:08 AM, Aschwin Wesselius wrote: Per Jessen wrote: header(location) mechanisms do come with a very huge disadvantage if you don't use them with caution. Requests are reinitialised, libraries loaded (again), DB connections setup/checked again, session lookups are bein

Re: [PHP] General use of rewrite / redirect

2008-03-18 Thread Jason Pruim
On Mar 18, 2008, at 10:11 AM, Per Jessen wrote: Per Jessen wrote: My typical setup for a form-page probably looks like this: if ( $_POST ) { // do POST processing header(303 thankyou.html). exit } If I wanted the user back on the same form page, but still with a "tha

Re: [PHP] General use of rewrite / redirect

2008-03-18 Thread Aschwin Wesselius
Per Jessen wrote: header(location) mechanisms do come with a very huge disadvantage if you don't use them with caution. Requests are reinitialised, libraries loaded (again), DB connections setup/checked again, session lookups are being done, log write for another request etc. That's quite an im

Re: [PHP] Re: problem with this regex to remove img tag...

2008-03-18 Thread Daniel Brown
2008/3/17 Jonathan Crawford <[EMAIL PROTECTED]>: > > http://www.regular-expressions.info/php.html I second http://www.regular-expressions.info/. -- Forensic Services, Senior Unix Engineer 1+ (570-) 362-0283 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://w

Re: [PHP] PHP 5 file_get_contents() problems

2008-03-18 Thread Thijs Lensselink
Quoting Greg Bowser <[EMAIL PROTECTED]>: for security reasons, allow_url_include can only be set from the main php.ini I wasn't sure about that one. Thanks for the correction. On Tue, Mar 18, 2008 at 10:22 AM, Thijs Lensselink <[EMAIL PROTECTED]> wrote: Quoting Chris <[EMAIL PROTECTED]>:

Re: [PHP] General use of rewrite / redirect

2008-03-18 Thread Per Jessen
Aschwin Wesselius wrote: > Per Jessen wrote: >> >> I'm having difficulties following you - a plain 303 redirect to a "Thank >> you" page shouldn't cause all of that. It's an HTTP reply with the 303 >> and the new URL, followed by a single URL request from the browser. >> > OK. I think I know ho

Re: [PHP] PHP 5 file_get_contents() problems

2008-03-18 Thread Greg Bowser
for security reasons, allow_url_include can only be set from the main php.ini On Tue, Mar 18, 2008 at 10:22 AM, Thijs Lensselink <[EMAIL PROTECTED]> wrote: > Quoting Chris <[EMAIL PROTECTED]>: > > > I've encountered a situation where under PHP 5 the file_get_contents() > > function will not work

Re: [PHP] PHP 5 file_get_contents() problems

2008-03-18 Thread Thijs Lensselink
Quoting Chris <[EMAIL PROTECTED]>: I've encountered a situation where under PHP 5 the file_get_contents() function will not work properly (actually not at all) if the php.ini Filesystem configuration parameter, allow_url_include is set to OFF. According to the PHP documentation allow_url_include

Re: [PHP] PHP 5 file_get_contents() problems

2008-03-18 Thread Greg Bowser
The actual setting is allow_url_fopen. allow_url_include controls whether or not you can use a remote URL as an include (however, if allow_url_fopen is off, then allow_url_include will also be off.) The short answer to your question is: yes, there is a way. Several ways, in fact. You could use cu

[PHP] PHP 5 file_get_contents() problems

2008-03-18 Thread Chris
I've encountered a situation where under PHP 5 the file_get_contents() function will not work properly (actually not at all) if the php.ini Filesystem configuration parameter, allow_url_include is set to OFF. According to the PHP documentation allow_url_include is intended to limiting PHP from acce

Re: [PHP] General use of rewrite / redirect

2008-03-18 Thread Per Jessen
Per Jessen wrote: > My typical setup for a form-page probably looks like this: > > if ( $_POST ) > { > // do POST processing > header(303 thankyou.html). > exit > } If I wanted the user back on the same form page, but still with a "thank you" message, I'd still do a 303,

Re: [PHP] General use of rewrite / redirect

2008-03-18 Thread Per Jessen
Aschwin Wesselius wrote: > Ok, let me point it out with an example: > > include(this); > include(that); > connect(db); > session check > > That is what normally could exist on a script for every page hit. Yep, that looks common enough. > If you have a page that only does this: > > if (GET ||

Re: [PHP] General use of rewrite / redirect

2008-03-18 Thread Per Jessen
Aschwin Wesselius wrote: > Per Jessen wrote: >> Yes, that's a very typical setup. When the form is processed, you >> send a 303 redirect to the "Thank you" page. That way, if the user >> hits the "back" arrow, he's taken back to the form URL, not the post >> URL. (which would then warn him abou

Re: [PHP] General use of rewrite / redirect

2008-03-18 Thread Aschwin Wesselius
jeffry s wrote: Requests are reinitialised, libraries loaded (again), DB connections setup/checked again, session lookups are being done, log write for another request etc. i don't see anything wrong with this since that is the way it is. whether you redirect or not, the script will do DB

Re: [PHP] General use of rewrite / redirect

2008-03-18 Thread jeffry s
On Tue, Mar 18, 2008 at 9:22 PM, Aschwin Wesselius <[EMAIL PROTECTED]> wrote: > Per Jessen wrote: > > Yes, that's a very typical setup. When the form is processed, you send > > a 303 redirect to the "Thank you" page. That way, if the user hits > > the "back" arrow, he's taken back to the form UR

Re: [PHP] General use of rewrite / redirect

2008-03-18 Thread Børge Holen
On Tuesday 18 March 2008 14:22:26 Aschwin Wesselius wrote: > Per Jessen wrote: > > Yes, that's a very typical setup. When the form is processed, you send > > a 303 redirect to the "Thank you" page. That way, if the user hits > > the "back" arrow, he's taken back to the form URL, not the post URL.

Re: [PHP] Re: problem with this regex to remove img tag...

2008-03-18 Thread David Giragosian
On 3/16/08, Ryan A <[EMAIL PROTECTED]> wrote: > > Now that thats over... can anybody recommend a good starting point to learn > regex in baby steps? > > Cheers! > R Mastering Regular Expressions, by Jeffrey Friedl ISBN 0-596-00289-0 -- -David. When the power of love overcomes the love of powe

Re: [PHP] General use of rewrite / redirect

2008-03-18 Thread Thijs Lensselink
Quoting Aschwin Wesselius <[EMAIL PROTECTED]>: Per Jessen wrote: Yes, that's a very typical setup. When the form is processed, you send a 303 redirect to the "Thank you" page. That way, if the user hits the "back" arrow, he's taken back to the form URL, not the post URL. (which would then war

Re: [PHP] General use of rewrite / redirect

2008-03-18 Thread Aschwin Wesselius
Per Jessen wrote: Yes, that's a very typical setup. When the form is processed, you send a 303 redirect to the "Thank you" page. That way, if the user hits the "back" arrow, he's taken back to the form URL, not the post URL. (which would then warn him about re-submitting etc.) Ok, fine. But

[PHP] Re: question about direct access to url

2008-03-18 Thread Donn Ingle
Use sessions or (not as secure) pass a hidden form field along from form.php to thankyou.php. You can look for it in thankyou.php and if it's not there then you know something's wrong. You'd check the $_POST array for your secret field and value. \d -- PHP General Mailing List (http://www.php

[PHP] Re: Re: help on using 'request_uri' to make a front-end site

2008-03-18 Thread Donn Ingle
Richard Heyes wrote: > The forward slash at the start causes your browser to ignore whatever > your current path is, albeit remain on the current domain. Okay, I think I am getting confused by this ~donn/ virtual path thing. I will try your suggestion it looks good. Thanks. \d -- PHP General M

Re: [PHP] General use of rewrite / redirect

2008-03-18 Thread Per Jessen
Aschwin Wesselius wrote: > I've seen form processing being done, when finished it gets a header > redirect to a 'succes' page. Yes, that's a very typical setup. When the form is processed, you send a 303 redirect to the "Thank you" page. That way, if the user hits the "back" arrow, he's taken b

Re: [PHP] question about direct access to url

2008-03-18 Thread Stut
On 18 Mar 2008, at 12:46, Sudhakar wrote: my question is about displaying a friendly message when someone directly types a url in the browser. example i have one file called form.php which processes the information entered in the form and lets say the next page is thankyou.php?firstname=david b

[PHP] question about direct access to url

2008-03-18 Thread Sudhakar
hi my question is about displaying a friendly message when someone directly types a url in the browser. example i have one file called form.php which processes the information entered in the form and lets say the next page is thankyou.php?firstname=david by seeing the url if someone types thanky

Re: [PHP] passing variables values using POST

2008-03-18 Thread Jason Pruim
On Mar 18, 2008, at 6:43 AM, Sudhakar wrote: i am presently passing the value of a variable to a php file using GET after data has been inserted to the database. ex= $firstname = $_POST["firstname"]; if(!$sqlconnection) { echo "error message"; } else { header("Location: thankyou.php?firstnam

Re: [PHP] passing variables values using POST

2008-03-18 Thread viraj
On Tue, Mar 18, 2008 at 12:45 PM, Stut <[EMAIL PROTECTED]> wrote: > On 18 Mar 2008, at 10:43, Sudhakar wrote: > > i am presently passing the value of a variable to a php file using GET > > after data has been inserted to the database. > > Why do you need to redirect? Why can't you display the th

Re: [PHP] passing variables values using POST

2008-03-18 Thread Stut
On 18 Mar 2008, at 10:43, Sudhakar wrote: i am presently passing the value of a variable to a php file using GET after data has been inserted to the database. ex= $firstname = $_POST["firstname"]; if(!$sqlconnection) { echo "error message"; } else { header("Location: thankyou.php?firstnameis=$

[PHP] General use of rewrite / redirect

2008-03-18 Thread Aschwin Wesselius
Hi, In too many projects / scripts / examples, I see rewrites or redirects being done like (pseudocode): if (good) { do something } else { header (location: http://otherpage) exit } Is this a best practice? What arguments are there to use this kind of mechanism? I've seen form pro

[PHP] passing variables values using POST

2008-03-18 Thread Sudhakar
i am presently passing the value of a variable to a php file using GET after data has been inserted to the database. ex= $firstname = $_POST["firstname"]; if(!$sqlconnection) { echo "error message"; } else { header("Location: thankyou.php?firstnameis=$firstname"); } how can i send the value of

Re: [PHP] Re: help on using 'request_uri' to make a front-end site

2008-03-18 Thread Richard Heyes
A link causes 'index.php/use1' to be appended to the full url [http://localhost/~donn/template-dev/routertest/] and at first, it's fine but after a few clicks, it keeps appending. Amazingly things still work, but the URL is out of control! Links that don't start with a / are taken to be relat

Re: [PHP] Re: help on using 'request_uri' to make a front-end site

2008-03-18 Thread Donn
On Tuesday, 18 March 2008 12:02:14 Richard Heyes wrote: > You can use $_SERVER['PHP_SELF'] which will give you the path to the > script or $_SERVER['REQUEST_URI'] (you will probably have to remove the > query string with this), along with either dirname(). The problem is that the URL does not stay

Re: [PHP] Re: help on using 'request_uri' to make a front-end site

2008-03-18 Thread Richard Heyes
The thing that would help here is if I could get a reliable way to extract the working 'path' (from an http:// pov) from the $_SERVER array somehow. Each of them gives a result tantalizingly close to the base, but they get it wrong in various ways. You can use $_SERVER['PHP_SELF'] which will giv

[PHP] preg-replace-callback problem

2008-03-18 Thread Khaled Mamdouh
In url http://www.php.net/manual/en/function.preg-replace-callback.php I read this example: '.$input[1].'';}return preg_replace_callback($regex, 'parseTagsRecursive', $input);}$output = parseTagsRecursive($input);echo $output;?> example does not work if there are more deep stateme

[PHP] Re: help on using 'request_uri' to make a front-end site

2008-03-18 Thread Donn Ingle
Shawn McKenzie wrote: > Does seem strange.  Try: > > http://localhost/~donn/blah/index.php"; /> > > Then just use /home, /use1 etc...  Might work. Right, I'll give it a go. It's not much different from wiring-in a php var naming the base with {$base}/use1 being the form. The thing that would hel