Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
It's a blank page and that's not how it's supposed to be :/
Can anyone help me out with this?
Code - http://pastie.org/private/9klk5tm6goixq4ev93tkq
-
Mord
You need closing parenthesis on every line that has one opening.
Example:
move_uploaded_file($_FILES["thematicseniorphoto"]["tmp_name"], "uploads/" . $_FILES["thematicseniorphoto"]["tmp_name"];
should be
move_uploaded_file($_FILES["thematicseniorphoto"]["tmp_name"], "uploads/" . $_FILES["thematicseniorphoto"]["tmp_name"]);
EDIT:
Next time use a while() statement and find a pattern of text to search/use. You'll go from 700 lines to like...20.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I'm making a file creating script in php using file_put_contents, so how do you place a file to the directory below?
For example the script is in localhost:8080/favicon/ and I want to place the file in localhost:8080, how can this be done?
$dest = __DIR__ . '/../filename';
file_put_contents($dest, $data);
See http://php.net/manual/language.constants.predefined.php
fclose(fopen(path_to_your_file_like_C:\abc\,"a"));
for more info go here.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
In learing mongo with php,I have a tiny problem,
that is all,any help would be great appreciated!
You need to read this MongoPHPQueries Page and probably before that you need to do as #RocketHazmat said and start with this MongoPHP Tutorial.
But here is something that might help you with the data you are trying to find.
$cursor = $collection->find(array("addressse.0.state" => "NY"));
The above will give you a cursor allowing you to iterate over each record that is returned. Hope this helps.
FYI - You need more than just that line above to get that to work. So follow the links.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
Why when it displays does it say Resource id #2?
All I am doing is fetching a simple number (0) out of a .txt file:
$num = fopen('qnum/qnum.txt', 'r');
echo $num;
You are not actually reading the file. You are only opening it and acquiring a reference to the file. You have to add more code (e.g. something along the lines of the answers to this question) to read the contents of the file.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I suck at regexp but i'd like to just do a simple filter where / is replaced with 1, " is replaced with 2 and < is replaced with 3.
I'd appreciate an example where the syntax would be straight forward, i'd like to run this filter through the input of a get variable provided by the user. A syntax like:
replace(/,1)
replace(",2)
replace(<,3)
.
Thanks.
I really don't see the need for regex here.. You can just use str_replace
E.g.
str_replace('/', '1', $_GET['var']);
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
Im trying to code a php script that will loop a process for each line in a Textarea post. I was wondering if someone can post an example.
foreach(explode("\n", $text) as $line) {
// do something
}
See the manual page on explode()
You might have to use \r\n instead of just \n for textarea (I remember figuring it out for quite a while)