Hello to everybody!
I have this code in the __constructor
$this->Reliability = new Reliability("name","url");
Problem: I got an unexpected strange error:
Fatal error: Class 'Reliability' not found in "/path/"
I'm using the "__autoload" method to call the required classes, but it doesn't work when I'm calling the file in a ModalB...
Say i have a query "select username from users". I want to output this query onto a PHP page but after every 10th row i want to display my own custom text. Any ideas?
...
My form validates and submits fine, but the variables are not being printed in the emailed results.
Can anyone take a quick look at my processing file and tell me why this might be?
<?php
// CHANGE THE VARIABLES BELOW
$EmailFrom = $EmailFrom;
$EmailTo = "[email protected]";
$Subject = "Proposal Submission";
$FirstName = $HTTP_POST_VARS['...
Working on a PHP script to essentially dump the results of a query into a .csv and then upload to a specific folder on our enterprise Google Docs.
The file is created and sent over to Docs just fine. However, it isn't being placed in the proper directory.
This is the function I'm using where $file, $folder, and $newtoken are strings li...
My website doesn't start a session when I visit, I don't know why but my website works like this:
<?php
session_start();
$title = "Home";
include("include/header.php");
include("include/functions.php");
?>
...HTML stuff here...
<?php
include("footer.php");
?>
But when I check with Cookies (add-on for Firefox) there are no...
It says that it "expects parameter 1 to be string". So i guess you cant have an array in preg_match. But what should I use instead? Thanks
$config['forbidden_names'] = array('admin', 'moderator', 'hoster');
if (preg_match($config['forbidden_names'], $string)) echo "Forbidden name!";
edit: in_array maybe. lol. im stupid
...
I seem to be completely unable to get around utf-8 character encoding.
So I'm exporting content from a database as a utf-8 xml file.
The software I am importing into is quite strict about character encoding, so I can't just put everything in CDATA tags.
There's a whole bunch of weird characters, e.g. , already in the data.
These are...
I have a string that has php code in it, I need to remove the php code from the string, for example:
<?php $db1 = new ps_DB() ?><p>Dummy</p>
Should return <p>Dummy</p>
And a string with no php for example <p>Dummy</p> should return the same string.
I know this can be done with a regular expression, but after 4h I haven't found a sol...
I am using php 5.3, and yes, there is a bug open for that, but some think this is not a bug, and this makes me wonder.
abstract class A{
private function bobo(array $in){
//do something
}
}
class B extends A{
private function bobo($shmoo,$shmaa){
//do something
}
}
This throws an error. Shouldn't inheritance ...
I now want to know that means this line:
printf("Answer: %00010.6f", 22);
He prints: 022.000000. But way? i know whar 6f means float.
thansk for answers
...
Is there a way in PHP use a HTML form to upload only the header of the file. The length of the header is defined within the first few bytes of the file, I want only that part nothing else. After I have received the last byte of the header, I don't want any more of the file. Is there a graceful way to do this in PHP or am I going to have ...
I have a PHP script that needs to make responses with http response codes, like HTTP 200 OK, or some 4XX or 5XX code.
How can I do this in PHP?
...
please tell me how I can improve this code:
<?php
class TEST {
function awalkstr($func,$a) {
$args = func_get_args(); array_shift($args);array_shift($args);
foreach ($a as &$val) {
if (!is_array($val)) $val = call_user_func_array($func,array_merge(array($val),$args));
else $val = call_user_func_array(__METHOD__,array_merge(ar...
I am using postfix for my linux mail server. The goal is to have any incoming mail dumped into a database with the headers and message information, then the e-mail being deleted from the mail server. Is there any way to make postfix post a message to a php file everytime a new e-mail comes in then delete the e-mail message? The only othe...
I have an online RPG game which I'm taking seriously. Lately I've been having problem with users making bogus characters with bogus names, just a bunch of different letters. Like Ghytjrhfsdjfnsdms, Yiiiedawdmnwe, Hhhhhhhhhhejejekk. I force them to change names but it's becoming too much.
What can I do about this?
Could I somehow check ...
What is the simplest way to pass a value from the "index" page to the SimpleModal Demo Contact Form? For example, if a user is logged in and their email address is stored in the variable $email, what is the most straightforward way to have that info available in the Demo Contact Form?
Thank you.
...
I am firing off a query in PHP to an MS Access database/odbc connection. The query looks like this
$commentSQL = "SELECT * FROM tblTicketComments WHERE requestNum = $foo";
$rs1 = odbc_exec($conn,$commentSQL);
if(!$rs1){
$this->comments[] = odbc_errormsg();
}
while($rs1){
$this->comments[] = "comment";
}
$foo is a number, a...
I have a foreach loop which loops through an array (simpleXML nodes). This array can have between 0 and several hundred items in it. I'd like to find a way to display the first 10 results and then have a link to display the next 10 and so on.
for instance, I currently have:
$i=0;
$limit=10;
foreach ($nodes as $node){
echo "here is the ...
hi friends,
recently i am going through a project of badge-builder with action-script and flash.now i need some help for image uploading from the flash interface to the server and showing it back in the flash interface,
the back-end programing language is php and i am using action-scrip 3 and flash cs5
can anyone please give me a righ...
Hai.
I've got site which is really weird, and now is making me troubles.
This is simplified structure
public_html
- adm
--- raport
------ raportpdf.php
--- class
------ Bonus
--------- Bonus_DAO.class.php
------ config.php
--- raport.php
- index.php
So. Index.php is giant loader. It has lines: (but I don't think that they are making ...