Hi,
I am using PHP and mySQL set up by my host on their server, so I have not downloaded any setup/installation files. I am also using Dreamweaver to edit files.
At first I had a test folder in my public_html folder that contained my test html and php. I made a welcome.html page that has a form in it, which passes variables to a welcome.php script that prints the variables to the screen. I got that working...
Now, I want to place all php scripts in a php folder under my root directory for security. I have a setIncludePath.php script in my public_html folder that reads:
<?php
set_include_path(get_include_path() .':/path/to/root/dir/php/');
?>
I added this to the beginning of my welcome.html page:
<?php
require_once('/path/to/root/dir/public_html/setIncludePath.php');
?>
I moved welcome.php into the /root/php folder and tested it. It doesn't work.
I wasn't explicit in welcome.html:
<FORM ACTION="welcome.php" METHOD=POST>
But I thought that was the point...
I have also edited my php.ini file:
include_path = ".:/path/to/root/dir/php"
What am I doing wrong?
Full path name?
Moderator: General Moderators
Re: Full path name?
Just to see if it worked, I changed the path in welcome.html:
<FORM ACTION="../../php/welcome.php" METHOD=POST>
didn't work...
<FORM ACTION="../../php/welcome.php" METHOD=POST>
didn't work...
Re: Full path name?
I ended up deleting everything and returning it to a condition where my old php scripts were working.
The culprit: my php.ini file. I reset:
session.save_path = /home/my/root/dir/path/phpsessions
My current directory setup:
/root
-/phpsessions
--/welcome.php
-/public_html
--/dbTest
---/welcome.html
Now, how do I set it up so welcome.html will pass variables to welcome.php in a folder outside of public_html?
The culprit: my php.ini file. I reset:
session.save_path = /home/my/root/dir/path/phpsessions
My current directory setup:
/root
-/phpsessions
--/welcome.php
-/public_html
--/dbTest
---/welcome.html
Now, how do I set it up so welcome.html will pass variables to welcome.php in a folder outside of public_html?