Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 8 years ago.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Questions concerning problems with code you've written must describe the specific problem — and include valid code to reproduce it — in the question itself. See SSCCE.org for guidance.
Improve this question
as we all know,there is a data type 'resouce' in php!I sometimes can encounter this data type!but I have some problems about this type!
when I have a db connect,I print the data type,it displays"resource(4, mysql link)",
when I create a image,I print the data type,it displays "resource(2, gd)"
i want to know what the number eg.'4','2' means in the "()".
sorry for my bad englis!
When you see resource(4, ...) what that means is that PHP is keeping a reference to a more complex object that isn't a normal PHP object, and thus can't be manipulated directly. It's typically used by libraries that interface with non-PHP code (such as database client libraries and the GD library).
The number is simply the ID number of that particular external object.
These resources are managed by the external library and only really given to PHP as an indirect reference; they only have meaning to the library code that created them.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 8 years ago.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
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
Improve this question
http://www.aliexpress.com/item/NEW-7-Android-2-3-256MB-DDR2-4GB-NAND-Flash-7-inch-tablet-pc/498159194.html - I got this link
Here you can see a buttons: bundle, color
If you click some of them the price will change, but the question is how can I parse that behaviour to my page via php?
The problem is that I can't understand where is javascript code that executes this, or how to find it, maybe someone got ideas about that?
Inspecting that page's source code I can see that the skuProducts variable in javascript contains this information encoded into a JSON-string. You can't really run this javascript code on your webserver, so you'll have to devise another way to get that variable's value - and then you can use json_decode() to get the contents.
Note that changing the amount of items results in an AJAX call to a shipping costs calculator. You could probably simulate that, but I'm not sure that webshop would like that (and it might be illegal).
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 8 years ago.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Questions concerning problems with code you've written must describe the specific problem — and include valid code to reproduce it — in the question itself. See SSCCE.org for guidance.
Improve this question
I have two PHP files: A.php and B.php. A passes $id to B using POST and B can get $id the first time but I need to jump back to B again using Header. This time the parameter gets lost.
How can I pass the parameter when I use Header to jump back?
You must Use $_REQUEST instead of $_POST so it will work in both case . and when you use header to jump back again use query string with same name.
you can pass id variable in the query string when you redirect.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions concerning problems with code you've written must describe the specific problem — and include valid code to reproduce it — in the question itself. See SSCCE.org for guidance.
Closed 9 years ago.
Improve this question
I use the method or function mysql_num_rows() in my php code, it worked great and had no issues. I later just changed my web host. I created a new database that is identical to my old one. I changed all the information to access the database and am getting access to the new database but it is throwing an error once the code reaches mysql_num_rows. Why am I getting an error for mysql_num_rows? The results are suppose to be 0 when the function is ran because I have no information in my new database, but I also added information just so I didn't get a 0 and it is still giving my an error. Why?!!!!
Sounds like you've moved to a server with a newer version of PHP - mysql functions are deprecated, use mysqli (and convert the rest of your database functions to mysqli):
http://au1.php.net/manual/en/mysqli-result.num-rows.php
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 8 years ago.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Questions concerning problems with code you've written must describe the specific problem — and include valid code to reproduce it — in the question itself. See SSCCE.org for guidance.
Improve this question
I have a trouble with the CCaptcha widget. Image is corrupted. Headers are looks right. When I tried to list an image as a text, I didn't find any text inclusions, it's looks like as a usual PNG content.
When I created an another webapp on the same framework instance, CCaptcha works correctly, but in my first webapp have a trouble.
In my case GD library is used. Access filter is not used.
I'd found an error. It was a space before PHP open tag in top of base controller file. And now the bug is fixed.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 9 years ago.
Questions concerning problems with code you've written must describe the specific problem — and include valid code to reproduce it — in the question itself. See SSCCE.org for guidance.
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
Improve this question
can you please help with my project, i'm just newbie on PHP programming.
i had an excel reader php, it's working good, converting my excel file into PHP .
i want hopefully to detect the newest excel file in the folder then convert it into html using excel reader.
is that possible?
hope you can help me, thank you so much
You can iterate over a directory in PHP by using dir (http://nl1.php.net/manual/en/function.dir.php )and then use filemtime to check when the file was modified (http://php.net/manual/en/function.filemtime.php ).
As for converting to HTML - I assume that you have your Excel file loaded into PHP data structures (objects or arrays for example); if so, you can easily generate HTML using echo statements or - perhaps a bit more advanced - a teplating system.