Hi i am converting a script from localhost to my web server, im getting an error with a
file
Its
include($_SERVER['DOCUMENT_ROOT'].'\'.'Nciworkplacement\views\layouts\'.$controller.'.php');
Does ($_SERVER['DOCUMENT_ROOT'] use different slashes(//) for localhost than a server on the internet?
Having it \ this way gives the below error
Parse error: syntax error, unexpected T_STRING in /home/a3013388/public_html/Nciworkplacement/index.php on line 52
The original way i had it was this way
include($_SERVER['DOCUMENT_ROOT'].'/'.'Nciworkplacement/views/layouts/'.$controller.'.php');
It worked this way on localhost
the errors i now get are
PHP Error Message
Warning: include() [function.include]: open_basedir restriction in effect. File(/usr/local/apache/htdocs/Nciworkplacement/views/layouts/jobs.php) is not within the allowed path(s): (/home/:/usr/lib/php:/tmp) in /home/a3013388/public_html/Nciworkplacement/index.php on line 52
PHP Error Message
Warning: include(/usr/local/apache/htdocs/Nciworkplacement/views/layouts/jobs.php) [function.include]: failed to open stream: Operation not permitted in /home/a3013388/public_html/Nciworkplacement/index.php on line 52
PHP Error Message
Warning: include() [function.include]: Failed opening '/usr/local/apache/htdocs/Nciworkplacement/views/layouts/jobs.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/a3013388/public_html/Nciworkplacement/index.php on line 52
The file in layout/jobs.php refers to another $_SERVER['DOCUMENT_ROOT' call.
Which way is the right way? and how do i fix the error