Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 8 years ago.
Improve this question
The title says it all. What would be the most performance-friendly way to delete a file? Using PHP's unlink()-function, or PHP's delete()-function?
There is no delete function to delete files. As the documentation states:
This is a dummy manual entry to satisfy those people who are looking for unlink() or unset() in the wrong place.
The links on that page will lead you to the correct function for deleting a variable (unset) or deleting a file (unlink).
Related
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 6 years ago.
Improve this question
I am trying to create an image that changes dependent on the genre grabbed from an icecast server, I am pretty sure I have the base code correct I think I've just incorrectly inputted the PHP variable.
<?php
$stats = $core->radioInfo( "http://http://sc.onlyhabbo.net:8124/status-json.xsl" );
?>
<img src=http://www.habbo.com/habbo-imaging/avatarimage?user=<?php
echo $stats['genre'];
?>&action=std&direction=2&head_direction=2&gesture=sml&size=m&img_format=gif/>
is the full code. Have I inputted the PHP variable incorrectly
Where are the quotes in your Html?
<img src="http://www.habbo.com/habbo-imaging/avatarimage?user=<?php
echo $stats['genre'];
?>&action=std&direction=2&head_direction=2&gesture=sml&size=m&img_format=gif"/>
UPDATE EVERYBODY
This is now resolved, I decided to go down the CURL route for this, and at first it didn't work until my host raised our CloudLinux Process Limit. I am unsure what the actual issue with this code was, but the CURL route works fine. Thank you for any answers
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 7 years ago.
Improve this question
I get this error while trying to update. The query works in phpmyadmin just fine.
Was a bind error, all fixed thanks to the great people here.
That's because you've got typo in your parameters.
You are using :serreceivetxt instead of :userreceivetxt and :serreceiveemail instead of :userreceiveemail.
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 7 years ago.
Improve this question
header("Location: {$TBDEV['baseurl']}/login.php?returnto=" . urlencode($_SERVER["REQUEST_URI"]));
Is it a variable? PHP reserved word? something to do with HTML?
It's a $_GET parameter. When you submit the code, the page receiving it will be able to use $_GET['returnto'] to return you to the page you're currently on.
Take some time to learn about $_GET
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 8 years ago.
Improve this question
foreach($db->fetch_array("SELECT id_categories FROM csn_categories_join_kartes where id_kartes===".$card['id']."") as $kat){
echo (kat['id_categories']);
}
table cols and values are all matched, something is wrong in this part of code
I tried adding $ before kat and using only one "=", sill doesnt work
NEW LINK
http://pastebin.com/RPK7vEaJ
this
where id_kartes===".$card['id']."
would be
where id_kartes=".$card['id']."
and missing $
echo $kat['id_categories'];
so full code :-
foreach($db->fetch_array("SELECT id_categories FROM csn_categories_join_kartes where id_kartes='".$card['id']."'") as $kat){
echo $kat['id_categories'];
}
best practice if you store your query result in a variable and loop over this variable.
foreach($db->fetch_array("SELECT id_categories FROM csn_categories_join_kartes where id_kartes=".$card['id']."") as $kat)
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 8 years ago.
Improve this question
I've been using session_start() fine with my other PHP files. Now however, I am trying to put functions into one file and then be able to call them from various other PHP files.
I simply have this in one file:
<?php require("CustomerFunctions.php");
start_session();
PrintCustomerTable();
?>
However I am getting Fatal error: Call to undefined function start_session()
Again, I am able to use start_session everywhere else in my files but now for some reason it won't work in this file. It has the same result even if I remove the require.
The function you're looking for is called session_start().