Jump to content

a php file with file name and path to be used in other scripts


Archimedees

Recommended Posts

 

I want to create a php file that I will include in all my files to enable my scripts  find  specs.conf file which they require in order to execute. I was thinking of something like

 

 

<?php

// define  specs.conf name and path

define("specsname", "Specs.conf");

define("specspath", "home/ragley/config/space.conf");

<?

 

Now, let's suppose this was working, I would then include it in all of my scripts that need to use specs.conf

Please  assist  me find out why it doesn't work.

 

 

 

Pleeeeease????

 

I want to create a php file that I will include in all my files to enable my scripts  find  specs.conf file which they require in order to execute. I was thinking of something like

 

 

<?php
// define  specs.conf name and path
define("specsname", "Specs.conf");
define("specspath", "home/ragley/config/space.conf");
?>

 

Now, let's suppose this was working, I would then include it in all of my scripts that need to use specs.conf

Please  assist  me find out why it doesn't work.

there is little wrong with your define statement.  Usually it is best practive to use uppercase for your constants, but that is neither here nor there.

 

Try turning on errors in your php.ini file or use ini_set() <- look in the manual.  And see where the error may lie.

 

It is probably down to spelling or you directory path.

 

Are you meant to use "specsname" instead of "space.conf" it seems there is no need to use that constant!

 

as themistral says, it is unclear what u are asking and i know it can be frustrating, but many people will ignore your pleas if you don't ask nicely.

 

good luck

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.