|
Have you heard of Google[^]?
If at first you don't succeed, you're not Chuck Norris.
|
|
|
|
|
what is joomla?pearl?
how are these different from PHP??
what is iphone developer?
what is sharepoint developer
|
|
|
|
|
|
Hi,
In my project there is singleton pattern used in php 4.4.4 and also Smarty used to display pages. Now we want to convert php 4.4.4 to 5.2.0 or above.
There is error occurred in singleton pattern like below.
"Non-static method" PaDbConnection::getInstance() should not be called statically in config.inc.php on line 177.
In config.php line no 177 is like below.
$db =& PaDbConnection::getInstance();
So I need help that how to modify the singleton class related to php5.2.0. anyone help me.
modified on Friday, July 3, 2009 12:22 AM
|
|
|
|
|
Go to php.net and check the release notes for all version of php between 4.4.4 and 5.2.0. In there you will find all the commands that have changed - and thus you should be able to find and fix your error. You should also get an error message that tells you what line is causing the error. that may help you in finding deprecated and removed commands.
|
|
|
|
|
Hi,
I am very new to PHP .
can any ne tell me how to strat and what to download for PHP and where to write php code?
Help me!!
|
|
|
|
|
|
1) First get a php & apache server running on your development machine like xampp[^]
2) Choose an editor. You can use notepad (if your using windows) but it doesn't colour the code for you, so it's hard to read. Good free alternatives are notepad++[^] and aptana studio[^]. If you don't mind parting with a bit of cash, Dreamweaver[^] is the don.
Then go through some tutorials like:
http://www.w3schools.com/[^]
http://www.tizag.com/phpT/[^]
modified on Wednesday, July 1, 2009 6:20 AM
|
|
|
|
|
Refer below sites. It will very useful for understanding and learning about PHP.
http://www.tizag.com/phpT/
http://www.w3schools.com/php/default.asp
|
|
|
|
|
In addition to other replies you can also download
WAMP server for PHP. It is bundled with Apache MySQL ... just like XAMPP.
for IDE you can search in google for eclipse PDT. Currently i am using it and its good.
I hope it helps.
Regards,
Sandip.
|
|
|
|
|
Hi all,
I'm looking for some direction in how to approach this problem.
$arr = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20);
I need to create a second array using the values in the first array in a random order, without repeating or omitting any of the values, except one of them.
I'm having such a hard time with this next part, and I even struggle to explain it. So please clarify as needed.
I need to fill the second array with a random combination of the first array, with one value repeated. But the value that is repeated has to be randomly selected from the first five positions of the new array, and it has to be placed randomly into one of the last five positions of the new array.
so assuming that the first five values of the randomly generated array are:
3, 7, 8, 19, 14
I would need to continue randomly filling the 2nd array with values from the first array ($arr, above) until I fill position 15 (the 16th value). Then positions 16-20 (17th through 21st values) need to have the 4 remaining numbers and one of the numbers from the first five spots (3, 7, 8, 19, or 14 in this example).
So that the final array would look something like this
$arr2 = array(
0 => 3,
1 => 7,
2 => 8,
3 => 19,
*4 => 14,
5 => 1, 6=>2, 7=>4, 8=>20, 9=>18, 10=>16, 11=>15, 12=>12, 13=>11, 14=>6, 15=>10,
16 => 17,
17 => 5,
*18 => 14,
19 => 9,
20 => 13);
I've indicated the repeated number with an asterisk and have used position => value nomenclature hoping for clarity.
In this case the value in position 4 is repeated in position 18.
I need this part randomly figured out during each iteration in addition to randomly filling all the original values contained in the first array. So the example above would be only one possible outcome.
Thanks in advance for any guidance you can provide. Please let me know if what I'm asking is not clear and I will try to clarify as needed.
Cheers,
Chris
|
|
|
|
|
Hi,
here is a hint: if you have a collection of numbers and need all or some of them, without duplication, then the easy way is: use a random number generator to get a random number in the range [zero, collectionLength-1]; then pick the number at that index location AND remove it from the collection. Repeat as often as required.
Luc Pattyn [Forum Guidelines] [My Articles]
DISCLAIMER: this message may have been modified by others; it may no longer reflect what I intended, and may contain bad advice; use at your own risk and with extreme care.
|
|
|
|
|
Hello everyone,
is there any class in php that i can use to convert my excel file to pdf?
Thanks in advance
jyn
|
|
|
|
|
|
Or any function that i can use in php to convert excel file to pdf.
Thanks
jyn
|
|
|
|
|
No, no built in function you can just call to convert an excel file to a pdf, as the original replier said check phpclasses for any results.
|
|
|
|
|
I am trying to save result from SOAP function to XML file. I am calling SOAP function getProductListResult of web service http://public.ws.cz.elinkx.biz/service.asmx (description is available without logging).
I want save/serialize getProductListResult->ProductList to XML but it is stdClass and cant be converted to string and i got:
Catchable fatal error: Object of class stdClass could not be converted to string
I tried calling $data->getProductListResult->ProductList->any but didnt help (nor $data->getProductListResult->any)
thanks for help
code:
$soap = new SoapClient(CONST_SOAP_EDSoapURL,
array( 'style' => SOAP_DOCUMENT,
'use' => SOAP_LITERAL,
'trace' => true));
$data = $soap->getProductList(
array( 'login' => CONST_SOAP_EDLogin,
'password' => CONST_SOAP_EDPassword,
'onStock' => 'true'));
$doc = new DOMDocument();
$doc->loadXML((string) $data->getProductListResult->ProductList);
$doc->save('_data/ceniky/cenikED.xml');
|
|
|
|
|
I wish to create and place buynow buttons on my site. Now if I create them and add a success url then the download location is visable. I could hide source but I was wondering if the success url was say success.php and the code would check the path of whoever activates it. Only allowing the download if the path is correct. Which in this case would be the Paypal site after payment made.
Bit of background:
I am creating an online garage sale for myself and as I am reasonably conversant with basic I putting together a automatic shop building program (I'm retired and its a hobby) Now creating the buttons with a fill in form is easy but the code is not encrypted. Thus my enquiry.
I have searched but have not found how to detect the difference between a redirection from Paypal and someone targeting the success url albeit a php file.
It all started due to the fact that I tried selling my stuff on Ebay and the insertion charges added too much cost to items I wish to sell.
they are all one off treasures. Actually Marc helped me with handling a one off item (Inventry Control) that led me to understand creation of a php info form. I am most greatful to him for that.
So any idea or pointer would be most welcomed. This is not a commercial project. At 66 I do not have enough time writing a help file and a Installation file Plus everything else that goes with it including a domain and web pages. Not that desperate yet.
Terry
|
|
|
|
|
you can send additional variables with your PayPal buttons (make sure you encrypt them - it's a pain but worthwhile). You have to create custom buttons.
You might also want to consider using PayPal's IPN & PDT variables to add the buyers info into a database upon a successful transaction. then when they get to the thank you page you can get them to check they have paid using your database (but this will be a time-consuming task).
|
|
|
|
|
G'Day Marc That is what I am doing for software downloads so the path is hidden. The reason I raised the question is that I now have a basic program to create the necessary php files to handle the inventry of one problem that you helped me with.
That led me to understanding how to set up a php based form. Which i prompting another basic program.
The buttons for AddtoCart, BuyNow, and Donate Buttons I now have a simple program with a input window to create.
The whole reason is to sell my bits and pieces on my online garage sale. So to make the task simple and consistant I am trying to automate with simple utilities.
It is coming together ok as you can see at Mr T's World
What I am after currently is to make a download imposible to do if it is not accessed by the right path.
You are right though in what you say. That is probably what I shall do.
By the way I am prepared to share my inventry producing software and shop structure.
I use Blue Voda's Web Builder and use my software to convert their preview file into a named html file and transfer it to a folder of my choice. I use it as it is dead easy to create a great site. every object is placed absolute.
Thanks Marc for all your help and have a G'Day
Terry
Terry
|
|
|
|
|
Hi I am PHP programmer. I try to create thumbnail using php exec(FFMPEG) function on linux server. But it will not create thumbnail.
On the same time the code works fine and create thumbnail in shell command of the same server when I tested it.
Anyone can help me. Thanks
|
|
|
|
|
make sure you have correct permissions on all relevant directories. make sure your server doesn't have exec disabled in php.ini
|
|
|
|
|
Thanks for your reply.
I checked that the correct permissions on all relevant directories and exec function not in disabled in php.ini. Problem is not in these two sections.
Finally I found the solution that change the safe mode in php ini file likes below.
safe_mode = On’ To safe_mode = Off’.
Now thumbnail created successfully.
Thanks again.
modified on Friday, July 3, 2009 12:28 AM
|
|
|
|
|
Remember to create membership in http://www.codeproject.com/
Using Yahoo Email Id.
Thanks and Regards
Malraj b
|
|
|
|
|
What?
If at first you don't succeed, you're not Chuck Norris.
|
|
|
|