Re: Need quick got written up yesterday!! OUCH (RESOLVED)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2009-08-04 at 08:08 -0700, Miller, Terion wrote:
> 
> 
> On 8/4/09 10:03 AM, "Ashley Sheridan" <ash@xxxxxxxxxxxxxxxxxxxx> wrote:
> 
> print_r($_SERVER);
> 
> I get:
> 
> Array ( [HTTP_HOST] => getpublished.news-leader.com [HTTP_USER_AGENT] => Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.0.13) Gecko/2009073021 Firefox/3.0.13 [HTTP_ACCEPT] => text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 [HTTP_ACCEPT_LANGUAGE] => en-us,en;q=0.5 [HTTP_ACCEPT_ENCODING] => gzip,deflate [HTTP_ACCEPT_CHARSET] => ISO-8859-1,utf-8;q=0.7,*;q=0.7 [HTTP_KEEP_ALIVE] => 300 [HTTP_CONNECTION] => keep-alive [HTTP_REFERER] => http://getpublished.news-leader.com/ResturantInspections/restaurants.php?show=all [HTTP_COOKIE] => GCIONID=TExITWZPTUtlZElNQUZrdjlWdkZVQkNOQk1CTEZLKzk3RWEzbENYWE81MD1+MX4yMDA5MDgwNH4yfnppcDo2NTgwN3x5b2I6MTk2OHxnZW46MXxjb3U6dXN8c2l0OmdwYXBlcjE3MQ==; anonId=72bd6954-d270-402a-a4d5-10f109166cef; rsi_ct=2009_8_4:51; PHPSESSID=ak6iv296ca08bj4eilbjjr0vd7; GCIONSN=cmVmOjB+bmQxOiU3QiUyMkxldmVsMU5vZGUlMjIlM0ElMjIlMjIlMkMlMjJMZXZlbDJOb2RlJTIyJTNBJTIyJTIyJTJDJTIyTmV3Q2xpY2slMjIlM0FmYWxzZSUyQyUyMlVSTCUyMiUzQSUyMmh0dHAlM0EvL2dldHB1Ymxpc2hlZC5uZXdzLWxlYWRlci5jb20vUmVzdHVyYW50SW5zcGVjdGlvbnMvdmlldy5waHAlM0ZJRCUzRDExMzclMjIlN0R+bmQyOm51bGw=; s_sq=%5B%5BB%5D%5D; s_cc=true; REVSCISN=true [HTTP_CACHE_CONTROL] => max-age=0 [PATH] => /sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin [SERVER_SIGNATURE] =>
> Apache/2.0.52 (Red Hat) Server at getpublished.news-leader.com Port 80
> [SERVER_SOFTWARE] => Apache/2.0.52 (Red Hat) [SERVER_NAME] => getpublished.news-leader.com [SERVER_ADDR] => 64.29.29.40 [SERVER_PORT] => 80 [REMOTE_ADDR] => 64.22.254.4 [DOCUMENT_ROOT] => /var/www/vhosts/getpublished.news-leader.com/httpdocs [SERVER_ADMIN] => rjasper@xxxxxxxxxxxxxxxxxxxx [SCRIPT_FILENAME] => /var/www/vhosts/getpublished.news-leader.com/httpdocs/ResturantInspections/view.php [REMOTE_PORT] => 30353 [GATEWAY_INTERFACE] => CGI/1.1 [SERVER_PROTOCOL] => HTTP/1.1 [REQUEST_METHOD] => GET [QUERY_STRING] => ID=1137 [REQUEST_URI] => /ResturantInspections/view.php?ID=1137 [SCRIPT_NAME] => /ResturantInspections/view.php [PHP_SELF] => /ResturantInspections/view.php [REQUEST_TIME] => 1249398440 )
> 
That's your problem then. Your $_SERVER['SCRIPT_FILENAME'] has a full
path in it. I think you maybe meant to use SCRIPT_NAME, which itself
even has the path relative to the document root in it. You could use the
basename() function to just get the filename of the path though.

Thanks,
Ash
http://www.ashleysheridan.co.uk


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux