Jump to content

path not recognized


dphil311

Recommended Posts

For some reason I've been having difficulty trying to echo a path from my database.  I'm running mySQL 3.23 and PHP 4+

 

Here's a test file:

 

http://pack1705.com/calendar/test.php

 

Here's the code:

 

<?php

echo 'Document root: '.$_SERVER['DOCUMENT_ROOT'].'<br />';
echo 'Path: '.$sem_config['path'].'<br />';
echo 'Path: '.$sem_config['news_url'].'<br />';
echo 'Path: '.$sem_users['full_name'].'<br />';

?>

 

As you can see, it is not calling any information from the database.  However the call function seems to be working with "Document root."  I'm not sure what is going on.  Maybe this will help someone point me in the right direction.

 

Thanks in advance,

Duane

 

Link to comment
https://forums.phpfreaks.com/topic/47553-path-not-recognized/
Share on other sites

I can't help since I'm unaware to see where $sem_config is defined...however, you may be able to try:

 

 

I guess I should have mentioned that I'm the guy who knows just enough to make himself dangerous.  ;)

 

So with that said, what kind of (specific) information do you need with $sem_config?  Basically I've created a test script to help me identify the problem within a calendar script.

 

Thanks!

Duane

Link to comment
https://forums.phpfreaks.com/topic/47553-path-not-recognized/#findComment-232118
Share on other sites

Where exactly in your script to you set $sem_config to some array?  I'll need to see that.  I'm assuming it's in a config.php that is included using include or require?  But either way, I'll need to see it.

 

Okay, here we go 8)

 

Here's the original error message:

 

http://www.pack1705.com/calendar/events.php

 

Here's the Line 12-16 of the code:

 

require $_SERVER['DOCUMENT_ROOT']."/".$sem_config['path']."admin/config.php";
$langfile = $_SERVER['DOCUMENT_ROOT']."/".$sem_config['path']."languages/".$lang.".lang.php";
$default = $_SERVER['DOCUMENT_ROOT']."/".$sem_config['path']."languages/english.lang.php";
if (file_exists($langfile))  include $langfile;
else include $default;

 

Hope this helps...thanks.

 

Duane

Link to comment
https://forums.phpfreaks.com/topic/47553-path-not-recognized/#findComment-232129
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.