JDMallion
Members-
Posts
16 -
Joined
-
Last visited
Never
Everything posted by JDMallion
-
Ha ha, just tested it with: C:/xampp/htdocs/webaddress.co.uk and is now working, how stupid of me! Thank you everyone for your help, these forums are great! Never would have worked that out!
-
Does not work with require or include, have tried that one Do not have more than one class and my core path is: http://localhost/webaddress.co.uk/php/ Just had a thought the use of a URL could have something to do with it, but I have turned on the setting that allows URLs.
-
The response to the var_dump was: string(45) "http://localhost/webaddress.co.uk/php/" bool(false) and throwing an exit; before the class is declared I get the same message: Fatal error: Class 'MySQL' not found in C:\xampp\htdocs\webaddress.co.uk\php\core.php on line 44 So looks like the class is just not being declared!! For some damn reason!
-
Yep the exit is just me finding the error and if I initiate inside the file then give the same error!! Stupid thing is I just tested it on our live web server and it runs fine so must be something to do with the PHP setup! Thanks again for all the help!
-
Please find the file attached, thanks for your help with this!! [attachment deleted by admin]
-
Error reporting is set to E_ALL and it is still only displaying the Fatal Error message. The files are being included because if I force an error by putting some random letters in there is throws a PHP error......really do not understand what is going on!
-
Nope, I have a class called MySQL. But it is not just an issue with this specific class I just commented out the MySQL class and the smarty class that is being include below throws the same error! :'( require_once ( smarty_dir."Smarty.class.php" ); $tpl = new Smarty();
-
Hi Guys, I am trying to build my application on my local test server (I have tried both WAMP and XAMPP just in case they were the problem) and I just keep getting the following error: Fatal error: Class 'MySQL' not found in C:\xampp\htdocs\webaddress.co.uk\php\core.php on line 44 The class file is being included because if I force an error in the file then it picks it up and displays an error! The code for including the class file is: switch ( database_type ) { case "MySQL": require_once ( core_dir."class.my-sql.php" ); $db = new MySQL( database_host, database_user, database_password, database_name ); $db->setNames( "utf8" ); break; } Really at a loss and any help would be appreciated!
-
@cags Yep, you are correct it is only if there are two or more present, so looks like I will have to go with your option. Was just waiting if there was a way to do it through regular expressions and not use another PHP function.
-
Am new to regex and am trying to run the following in PHP: $requestUri = preg_replace("/(-|_){2,}/", "_", $requestUri); I need to replace the amount of dashes or underscores found with the same amount of a different value. So for example if it found --_---- it would replace it with __________ but also if it found -- it would replace that with __ I am sure there is a way but I do not know how. Any help would be appreciated.
-
Hi Guys, I have a page that automatically spits out a load of links in the following format: <a href="LINK">NAME OF LINK</a> <a href="LINK">NAME OF LINK</a> <a href="LINK">NAME OF LINK</a> etc.... Without editing how these are spat out, would it be possible and if so what is the best way of having a tickbox at the top of the page which forces all links to open in a new tab? Without Javascript (hence in this section) if possible and without having to reload the page. Cheers for any help!
-
Pretty sure that will do want I want it to mate, will just have to check we have Curl installed on the server! Or does it come with the standard PHP install?
-
Thanks loads guys!! Very much appreciated! God I love these forums!
-
Hi guys, I want to write a PHP script to check several of the websites that we run. I will have it run each day using a CRON job therefore automatically checking our sites each morning. I basically just want the script to go to each website and check that they are still up and running. Now I know that I will have to get the HTTP server response code to work out whether or not the website is up or not. But I am not 100% sure on how to do this!! A point in the right direction would be really good. Thanks in advance for any help!!