Full path name?
Posted: Tue Jun 23, 2009 4:03 pm
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?
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?