{"id":489,"date":"2005-03-19T01:14:25","date_gmt":"2005-03-19T06:14:25","guid":{"rendered":"http:\/\/www.xorph.com\/creator\/2005\/03\/19\/489\/"},"modified":"2005-03-19T01:14:25","modified_gmt":"2005-03-19T06:14:25","slug":"489","status":"publish","type":"post","link":"https:\/\/www.xorph.com\/nfd\/2005\/03\/19\/489\/","title":{"rendered":""},"content":{"rendered":"<p>I need PHP to go up one level of a directory, then go back down several more, to include a file.  I don&#8217;t know how to do this, but I&#8217;ve been getting around it by using a URL instead of a path; now Dreamhost is turning off the option of using URLs in include statements, for (good) security reasons, so I can&#8217;t do that anymore.<\/p>\n<p>I also absolutely can&#8217;t find a way to do it the path way.  It won&#8217;t work with an absolute path from the root directory, nor from the highest web-accessible directory (I&#8217;m in a Linux \/ Apache environment, if you hadn&#8217;t guessed).  I can&#8217;t use ..s to ratchet up, or do any other kind of relative movement I can think of.  Does <i>anyone<\/i> know how to get what I want?<\/p>\n<p>Actually, Lisa, I think you&#8217;re the only PHP programmer who reads this, so maybe I should have just emailed you.  But I might be wrong.<\/p>\n<p><b>Update 0224<\/b> hrs:  Never mind.  I found out how to do it, but it doesn&#8217;t help, since I need to have Apache parse the file (a NewsBruiser portal CGI, if you hadn&#8217;t guessed) before I grab it, and an internal include obviously doesn&#8217;t do that.  I&#8217;ll have to use the curl library, once I figure out what it is.<\/p>\n<p>And I know I&#8217;m a bad programmer for going with this setup in the first place, but I had the choice of frames, meta refreshes or dumping a load on PHP, and it was rocks and frying pans all over.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I need PHP to go up one level of a directory, then go back down several more, to include a file. I don&#8217;t know how to do this, but I&#8217;ve been getting around it by using a URL instead of a path; now Dreamhost is turning off the option of using URLs in include statements, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,5,20],"tags":[],"class_list":["post-489","post","type-post","status-publish","format-standard","hentry","category-metablogging","category-stress","category-web-design"],"_links":{"self":[{"href":"https:\/\/www.xorph.com\/nfd\/wp-json\/wp\/v2\/posts\/489","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.xorph.com\/nfd\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.xorph.com\/nfd\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.xorph.com\/nfd\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.xorph.com\/nfd\/wp-json\/wp\/v2\/comments?post=489"}],"version-history":[{"count":0,"href":"https:\/\/www.xorph.com\/nfd\/wp-json\/wp\/v2\/posts\/489\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.xorph.com\/nfd\/wp-json\/wp\/v2\/media?parent=489"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.xorph.com\/nfd\/wp-json\/wp\/v2\/categories?post=489"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.xorph.com\/nfd\/wp-json\/wp\/v2\/tags?post=489"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}