Results 1 to 5 of 5
October 22nd, 2005, 12:06 AM #1PHP file name help
I used to run this at my old web host and it works:
On the new server, it won't return the page that the users is looking at. I get this:
I think the new web host has set up PHP differently that my old one. At the new place, I can actually edit my own php.ini file (inside the cgi-bin) so others on the same sever won't be affected by my changes.
Does anyone know how I can grab the filename / page (ie. /index.html) that the code is running on?
October 22nd, 2005, 12:23 AM #2
From PHP.Net (available @ http://php.net/reserved.variables)
The filename of the currently executing script, relative to the document root. For instance, $_SERVER['PHP_SELF'] in a script at the address http://example.com/test.php/foo.bar would be /test.php/foo.bar. The __FILE__ constant contains the full path and filename of the current (i.e. included) file.
The URI which was given in order to access this page; for instance, '/index.html'.
October 22nd, 2005, 01:05 AM #3
Fantastic Rogi. Now why couldn't me new web host just tell me that. They both work falwlessy! Thanks!
October 22nd, 2005, 01:16 AM #4
October 27th, 2005, 08:15 PM #5Originally Posted by Affiliate Ian
You can run your own php.ini changes just about anywhere:
See also http://us3.php.net/manual/en/configuration.changes.php
By teezone in forum Programming / Datafeeds / ToolsReplies: 8Last Post: September 4th, 2009, 04:54 PM
By Abtek in forum PopShopsReplies: 0Last Post: April 24th, 2009, 09:31 AM
By Uncle Rico in forum Programming / Datafeeds / ToolsReplies: 7Last Post: January 19th, 2009, 01:11 PM
By randomtexture in forum GoldenCANReplies: 2Last Post: January 1st, 2009, 12:04 AM
By dak142 in forum Programming / Datafeeds / ToolsReplies: 8Last Post: April 2nd, 2004, 06:24 AM