chdir() issues.

From: Date: Fri, 23 Aug 2002 02:10:09 +0000
Subject: chdir() issues.
Groups: php.general 
Request: Send a blank email to php-general+get-113707@lists.php.net to get a copy of this message
Hi- I seem to be struggling with the chdir() function in PostNuke. And having searched the PN website and forum I think that I've come to the conclusion that it just might not be possible to change directories in the PN environment. But this doesn't seem right. So before all is lost, I propose it to you... What I am trying to do is take a completely separate program from PN, run it from it's own directory but wrap the look and feel of my PN site. Seems easy enough. This is what my site looks like: http://www.TheNobleGrape.com This is what happens when I use the chdir() to try and grab the theme: http://www.TheNobleGrape.com/phpwims/ Here is my code: I copied the whole page, if there's an interest. <?php ######################################################### # filename: blank.php chdir('/home/httpd/mypath/html/'); include 'includes/pnAPI.php'; pnInit(); include 'includes/legacy.php'; pnThemeLoad('PostNuke'); # includes the mainfile functions and the header junk if (!isset($mainfile)) { include("mainfile.php"); } include("header.php"); // Name: index.php // Author: R Sean Eidemiller // Last Modified: June 05, 2002 // ---------------------------------------------------------------------------- print <<<EOF <html> <head> <title>PHP Wine Inventory Management System</title> <head> <body bgcolor="#FFFFFF"> <br> <center>
      <font size="6"><b>PHP Wine Inventory Management System v0.3.1</b></font>
      <br><br>
      The current date and time, according to this particular server, is <b>
EOF; // ---------------------------------------------------------------------------- $time = /bin/date; print "$time</b>\n"; // ---------------------------------------------------------------------------- print <<<EOF
      <br><br>
      <table border=0 cellpadding=0 cellspacing=0>
<form action="login.php" method="post"> <tr>
	    <td align="right">
	       Username:
	       <input type="text" size=15 name="user">&nbsp;&nbsp;
	       &nbsp;&nbsp;Password:
	       <input type="password" size=15 name="pass">
	    </td>
	    <td>
	       &nbsp&nbsp;&nbsp;&nbsp;&nbsp;<input type="submit"
value="Enter Database">&nbsp;&nbsp;
	    </td>
</form>
      </table>
      <br>
      Version 0.3.1 was released on June 08, 2002 by R Sean Eidemiller
      (<a href="mailto:sean@vanwyk.org">sean@vanwyk.org</a>)
      <br>
      Click <a href="http://phpwims.sourceforge.net/documentation.txt"
         target="resource window">here</a>
      to view the online documentation and notes for the latest release.
      <br><br>
      Please note that absolutely no penguins were hurt during the production
      of this web page.
</center> </body> </html> EOF; // ---------------------------------------------------------------------------- /* PHP Wine Inventory Management System (phpWIMS) Copyright (C) 2002 R Sean Eidemiller This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ // include footer junk include("footer.php"); ?> <!-- That's it, all done! --> Thanks in advance. luke.stickney

« previous php.general (#113707) next »