Current location: Hot Scripts Forums » Programming Languages » PHP » Best way??


Best way??

Reply
  #11 (permalink)  
Old 06-19-09, 06:45 AM
Wolf1994 Wolf1994 is offline
Wannabe Coder
 
Join Date: Sep 2005
Location: Russia
Posts: 117
Thanks: 0
Thanked 0 Times in 0 Posts
Seems to me is there need to use:
Quote:
echo "<script type=\"text/javascript\">
inside a ".<acronym title="JavaScript">js</acronym>" file. Seems it can be used in HTML output only.

P.S. Sorry, doubled the above answer.

Last edited by Wolf1994; 06-19-09 at 06:48 AM. Reason: Did not read the the above topics.
Reply With Quote
  #12 (permalink)  
Old 06-19-09, 06:52 AM
connor connor is offline
Wannabe Coder
 
Join Date: Apr 2005
Location: Knob Noster, Mo
Posts: 228
Thanks: 1
Thanked 0 Times in 0 Posts
Ok, so I figured something out. When I take the include out the script works, but when I use the include it doesn't I have since changed that par to look as follows.

File "./includes/js1.php"
PHP Code:

<?PHP
define
('__SNMS'true); //REMOVE FOR PRODUCTION USE.
//defined('__SNMS') or die(); //If not set kill session.
header('Content-Type: text/javascript');
include(
$_SERVER['DOCUMENT_ROOT']'/config.php');
switch(
$_GET['script']){ // AND ON AND ON
File "./config.php"
PHP Code:

<?PHP
defined
('__SNMS') or die(); //If not set kill session.
session_start();

$config['debug']="1";
$config['style']="ss_silver";
$config['site_title']="SITE TITLE";

$MySQL['host']="localhost";
$MySQL['user']="USER";
$MySQL['pass']="PASS";
$MySQL['datb']="DB";
?>
and the other files that include the config.php work...
__________________
Connor Strandt
JCS Photography
www.JCStrandt.com
Reply With Quote
  #13 (permalink)  
Old 06-19-09, 06:54 AM
connor connor is offline
Wannabe Coder
 
Join Date: Apr 2005
Location: Knob Noster, Mo
Posts: 228
Thanks: 1
Thanked 0 Times in 0 Posts
never mind I forgot a .' on the include.
__________________
Connor Strandt
JCS Photography
www.JCStrandt.com
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump


All times are GMT -5. The time now is 08:38 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.