if script executing locally- do this, if remote-do that
hello everyone,
need some advice on the best way to do this, not sure if some logic like this is even needed, i may be over thinking it.
First a little background:
I have a clipbucket 2.6 site. works great on remote. when i install with xampp on my personal computer errors being thrown of
Call to undefined method ADODB_mysql::select()
now i found a fix for this on their site, it is to change a line in their code:
require 'adodb/adodb.inc.php';
to something that will reference the file correctly in a local environment. some people suggest
require '/FULL PATH TO/adodb/adodb.inc.php';
but that does not work for me, i get errors of not being able to find file, turns out it only works on wamp or lampp, i use xampp
THIS is what works on my local xampp test server:
require 'C:\xampp\htdocs\videoz\includes\adodb\adodb.inc.php';
NOW MY QUESTION:
require 'C:\xampp\htdocs\videoz\includes\adodb\adodb.inc.php';
will not work on remote to reference the file correctly.
How can i make some logic to decide if a script is being executed on local or remote and include a filepath accordingly?
if file exists?
server root?
suggestions?'
ideas?
is this even the right way to go about this? I cant figure out a way to scructure the include to work with both, i have it disabled to use variables in include statements (whatever its called), ha
any suggestions on how to do this effectively and most importantly safely??
thanks a ton for your attention!
