-
Posts
15,229 -
Joined
-
Last visited
-
Days Won
427
Everything posted by requinix
-
Compile your own version of PHP. Have you considered trying to, oh I don't know, fix the problem? Assuming there is one in the first place?
-
Your backslashes aren't paired up properly. $pattern = '/^(C:\\\\)[A-Za-z0-9\040\.\-\\/]$/';
-
Then try having two of those date comparisons, one in each place. The innermost query will then find duplicate names within your time period while the outermost query will find matching records with those names... within your time period.
-
Besides the $POST['cancel'] typo, the buttons have to be in a form. $id = 776; print '$id ' . "$id\n"; if(isset($POST['cancel'])){ print "Exiting"; exit(); } if(isset($_POST['submitted'])){ print '$id ' . "$id"; } print " </pre> <form method='\"post\"'> </form> <br>";<br [edit] Oookay, indentation doesn't want to work for me.
-
If neither of those do what you want (I thought you might have a syntax error) then what do you want? The couple options I can think of should be answered by one of those queries.
-
What query did you try?
-
It's probably malicious, trying to send all of your visitors to that other site instead. You wouldn't notice because you're not getting to your site via Google.
-
Outside of a character set ^ means the beginning of the string (or in multiline mode the beginning of the line). As the first character inside a character set ^ means "none of the following characters". As anything after the first character inside a character set ^ means literally a ^. That's all. If you don't want something to match then use a negative assertion, but you then have to specify something that can match. \[\[start:(?!$keep\])[^\]]+\]\]... The added \] after $keep is so that $keep=123 will not prevent [[start:1234]] from matching.
-
How to create Apache access log each month automatically
requinix replied to TFT2012's topic in Apache HTTP Server
Had you looked at the manual before blindly trying random things you would have seen a note about piped logs. Related, here is the manual page for rotatelogs which demonstrates how you can have a daily log file; I think it will append to existing files so you could write the filename to be per-month and use a per-hour interval (to handle DST changes). -
I'll take that as a "no" then. define( "DOWNLOAD_ROOT", __DIR__ . "/" ); __DIR__ is for PHP 5.3+ only. For define( "DOWNLOAD_ROOT", dirname(__FILE__) . "/" ); You should install PHP 5.2 on your machine at home so there aren't any more of these problems.
-
Your website is not running PHP 5.3. Can you upgrade it?
-
date_default_timezone_set
-
$weekPay = (($hourly * 40) + (1.5 * hourly) * otHours); Find your php.ini, set display_errors = on error_reporting = -1 then restart your web server and find out what error messages PHP has for that line.
-
You can't header redirect and trigger a download at the same time. You could redirect to the page which then redirects to the download (and thus won't take the user away from that page). Other options depend on the purpose of the pages and the download.
-
How does that work?
-
From Scanner to website, How to Question?
requinix replied to FarrisFahad's topic in PHP Coding Help
As long as you're not talking about the client's computer and scanner, a command-line program is probably your best bet. -
Not working how? Error messages? The site is still showing the __DIR__ version.
- 12 replies
-
- php directoryhelp.
- error
-
(and 2 more)
Tagged with:
-
- 12 replies
-
- php directoryhelp.
- error
-
(and 2 more)
Tagged with:
-
You don't. include_once(dirname(__FILE__) . "/../admin/config.php");
- 12 replies
-
- php directoryhelp.
- error
-
(and 2 more)
Tagged with:
-
Well that's certainly not normal. Okay, DOCUMENT_ROOT won't work. Next best thing is a relative path. Assuming you have PHP 5.3 or later, include_once(__DIR__ . "/admin/config.php"); Looks the same, huh? The DOCUMENT_ROOT version works by starting at the root of your website and going to the admin/config.php file from there. Using __DIR__ is relative to the file you put the code in, which could be the root or could be someplace else. Say you have a file include/config.php and want to include the admin/config.php stuff. The two methods together then look like // start at the website root, go to admin/config.php include_once($_SERVER["DOCUMENT_ROOT"] . "/admin/config.php"); // start in this directory, go up a directory, then go to admin/config.php include_once(__DIR__ . "/../admin/config.php");
- 12 replies
-
- php directoryhelp.
- error
-
(and 2 more)
Tagged with:
-
That leading slash means to look in the root of the drive. It's akin to saying C:\admin\root.php. Naturally that's not where your file lives. It actually lives in /home/username/public_html/admin/root.php. So that's what you need to say. Easiest method is include_once($_SERVER["DOCUMENT_ROOT"] . "/admin/root.php");
- 12 replies
-
- php directoryhelp.
- error
-
(and 2 more)
Tagged with:
-
A correction to what you've said in a couple places: You are not using the "W3C geolocation API". It is not provided by the W3C. You aren't getting data from them. They made a standard for how one can write Javascript to try to get geolocation information, but that information is actually coming from the browser. The browser will do whatever it wants to try to get a location: maybe the user set it beforehand, maybe it does an IP address-based lookup, maybe it ties into GPS information available on the device, or maybe it says no and returns nothing.
-
Fatal error: Call to undefined function check_input()
requinix replied to johnsheehan's topic in PHP Coding Help
Nothing you posted tries to call a check_input() function. You're not showing us the right code. [edit] Please use or [code=php:0] tags around your code. Makes things much easier to read. -
So to be sure, you're still getting the "URL file-access is disabled" message? With a bit of digging it seems that message only happens when you try to include() a php:// URL. What version of PHP are you using? What's the code?
-
You sure about that? What does phpinfo() or ini_get() say?