-
Posts
15,266 -
Joined
-
Last visited
-
Days Won
431
Everything posted by requinix
-
At the end of a script, when PHP closes handles and destroys any remaining objects, the working directory may (and probably will be) completely different from where it was during the rest of the script. That means "t.txt" won't be where you think it should be. Try looking in the main Apache directory. Don't use the destructor to write files. Do it normally: make a separate function for it and call that from your script when you want it to save the file.
-
I think you should use whatever you want to use. Just do it consistently.
-
Assuming there's just the one shop and there are an infinite number of non-tradeable items, Yes, have a table listing the items for sale. It'll surely have more columns: while items can have a base value I'd make the shop list its own value (which may very well be the same as the base value). When someone buys you "copy" the item to their inventory. I mention "infinite number" and "non-tradeable items" because if that's not the case then things are a bit different.
-
Where is the code that calls get_thumbnail()? Does it look like ThumbnailHelper::get_thumbnail()
-
Yes, they disappear too. The exception is sessions. HTTP is stateless: it does not keep track of the state between requests. PHP does not know what happened on the last page. That means every script has to start from scratch: there aren't any variables or classes or database connections from before. The solution is to have your scripts load what they need. Need a class defined? require_once() the file. Need a database connection? Create one. Need a value? Look it up.
-
Inside classes you have to use $this-> for member variables and member functions. Without, PHP will look for a normal variable (inside the function) and normal function (global function). $two = $this->two(); $three = $this->three();
-
CSS Help has @imported this topic. http://www.phpfreaks.com/forums/index.php?topic=356905.0
-
With JavaScript? No way I can think of.
-
Untested. function moveserial(self, to) { if (self.value.length == self.maxlength) { self.form[to].focus(); } } - -
-
This topic has been remastered in brilliant HD quality in JavaScript Help. http://www.phpfreaks.com/forums/index.php?topic=356870.0
-
Sure. Stick an onkeypress in each one that moves focus() to the next one if the value.length == maxlength.
-
You're calling storeFormValues() wrong. It (more specifically __construct) wants an associative array.
-
want to store a file directly in the right folder
requinix replied to kiran123's topic in PHP Coding Help
Not possible. -
At the very end. ?> Try removing the ?> entirely.
-
It looks like there's some whitespace at the end of core.inc.php. That shouldn't be there. Easiest way to avoid that kind of problem is to just forgo the end tag. Leave it out. It's not like it's necessary.
-
It's possible but there are restrictions on what you can do (not to mention browser support). If you only want future dates shown then only show future dates. Is that trickier than it sounds or something?
-
Use XAMPP or LAMPP on Production.
requinix replied to zohab's topic in PHP Installation and Configuration
Then maybe you should go with IIS. The actual server software doesn't matter (in terms of this discussion). What matters is making sure the person setting it up knows what to do, how to do it, what not to do, and how to avoid doing it. If the guy knows IIS then don't make him deal with Apache; if the guy knew Apache then he shouldn't have to support IIS. Using something like XAMPP just means you don't know what you're doing. That's the problem. -
Reminds me, I totally need to clean up my Apache configuration too It depends on the Include directive. My Ubuntu 11.10 with Apache 2.2 uses Include sites-enabled/ which means that Apache scans its files and subdirectories. If it were "sites-enabled/*" then it would only check the files. I just tried sticking a link in three levels deep and it worked fine. Are you sure the symlink is right? Normally they're like "../sites-available/foo", which would break if you simply moved the file somewhere. But Apache should complain if that were the case.
-
Hahaha... For something like this you do research, not try to solve it yourself. Maximizing Sharpe Ratio (PDF, MSCI Barra) Sharpening Sharpe Ratios (Goetzmann et al.) Maximizing the Sharpe Ratio Consult Google for more. And I can't vouch for the accuracy or validity of anything linked to above; use at your own risk, etc.
-
Both questions can be answered with a link to number_format.
-
With math. What equation?
-
Question: how important is it that there's two decimal points? Seems that restriction keeps getting relaxed...
-
What's your .htaccess right now?
-
{2} of what?
-
Can you post the whole code without separating it into pieces?