Following are a few bookmarked links to the most common questions on this forum.
How to avoid PHP handling errors : generated by the functions, Why is the @ symbol used?, What is the difference between functionname() and @functionname().
Clickable Ordering : Sorting the rows in Ascending or Descending order by any field just thru a single click.
Register Globals : Let the script behave as if register_globals is on even if it is off.
Writing numbers with decimal places, e.g., 4.5 as 4.50; it's called number_format, people.
My variables don't work when I 'write $them like this'. No, they don't. If you want variables inside strings to work like variables the strings need to be "double-quoted". Info can be found here, here, here, here, and most importantly here.
A parse error about some kind of "unexpected $end" on the very last line of the file? You're probably missing a closing brace. If you're not (have you checked?), that thread suggests some other possibilities. But a missing "}" is the most likely cause.
cron: It's for running programs at regular intervals. You can use it for your scripts, too. (Windows has a task scheduler.)
Progress meters for things like file uploads? PHP's session extension provides an interface for monitoring upload progress. The APC extension also hooks to allow monitoring files as they are being uploaded. An IBM article illustrates its use. Prior to 5.2, it was basically impossible to do purely in PHP. If you're using an older version, then you'll have to mix technologies (e.g., this one which uses a bit of Perl), or an independently-developed hack (such as this patch and extension that claims to add support). Either way, you will want some Javascript coding to keep the progress bar updated.
Bunkermaster's Debugging 101 thread in the Echo Lounge.
www.php.net/links. Professional associations, link catalogues, FAQs, script libraries, developers' articles, tutorials, magazines, accelerators/encoders/compilers, editors, hosting, job listings.... you still here?
If you feel that we missed out some. Just PM moderators of this forum.
All replies to this thread when this thread is unlocked/being edited will be deleted.
When you have got your problem solved please click the "Mark Thread Resolved" at the bottom of the thread. This makes it easier for people go to threads where there are more chances of them finding a working solution.
Extra board markup
For posting PHP code, put it in [php]...[/php] tags:
PHP Code:
for($i=$n+50; $i<2*$n; $i++)
{
echo "Just some text on line $i\n";
}
For HTML markup, use [html]...[/html] tags:
HTML Code:
<form action="upl.php" method="GET"><input type="text" value="FOO!" /> and then <input type="submit" value="SUBMIT!" /></form>
For any other sort of code and stuff for which you want the spacing to remain
unchanged, use [code]...[/code] tags:
To prevent vBulletin from parsing board markup tags when you don't want it to, wrap them in [noparse] ... [/noparse] tags. This works for smilies, too :).
Please use these, as they make code much easier to read!
Do's / Don'ts
The General overview:
If it's improper to say something in a public place comprised of mixed races and ages, it's inappropriate to post it here in the forums.
Advertising on the board:
We can't allow this in any form. If someone is interested in getting exposure through the site, please contact the administrator via email at staff@phpbuilder.com . Footers may contain a pitch - it's a bit of a trade-off. The user is contributing to the community and in return they get exposure via their footer. Posting useless stuff and a huge ad in their footers is a complete NO.
Off topic posts:
Please use the Echo Lounge forum.
Footer size: We need to limit this to 5 lines. Obviously if there are 20 posts on a page and we allow more, we'll end up with 100 extra lines to scroll when reading messages.
Job posts:
They all go here. Posting them anywhere else will see them deleted, and may earn an infraction.
Last edited by Weedpacket; 10-27-2011 at 08:07 PM.
Hi...i'm new at this PHP thing and i'm not sure how to code things and how the code thing works....where do the codes go? i'm an administrator on a website...where am I supposed to put the codes? I'd greatly appreciate it if you can help me out..
Codes start with either <?php or <? depending upon your PHP setup. The first is the global way, the second is an alternative (called "short tags") and isn't guaranteed to be enabled on every server.
The ending tag is ?> (note no PHP) and delimits that the PHP parser should stop parsing at that point.
You can chunk code like:
PHP Code:
<?php
// This is the first chunk
?>
<!-- Some HTML code would be in here -->
<?php
/// This is the second chunk
?>
and the parser would do all the code.
With PHP, each line is ended with a semicolon (. If you don't end your line with it, you get a parse error, then you have to go find where you missed it.
You can of course read all this and more in the manual (linked above).
Yes, possibly because your posts are moderated for whatever reason (content, links, whatever) and is waiting on a Mod to approve your posts. I've approved your posts. Next time, if your post doesn't show up immediately, you don't need to repost, just wait for a few hours. If it still doesn't show up, just wait longer.
We should also put out a message telling users to move to PHP5.
We had just such a notice posted throughout the second half of last year.
PHP 4 IS NO LONGER BEING SUPPORTED!!
UPGRADE PHP AS SOON AS POSSIBLE.
PHP has announced that PHP 4 will no longer be supported beginning January 1, 2008. They ask people to start migrating over to PHP 5 now.
Critical security releases for PHP 4.4 will be released on a case-by-case basis
Originally Posted by PHP
[13-Jul-2007] Today it is exactly three years ago since PHP 5 has been released. In those three years it has seen many improvements over PHP 4. PHP 5 is fast, stable & production-ready and as PHP 6 is on the way, PHP 4 will be discontinued.
The PHP development team hereby announces that support for PHP 4 will continue until the end of this year only. After 2007-12-31 there will be no more releases of PHP 4.4. We will continue to make critical security fixes available on a case-by-case basis until 2008-08-08. Please use the rest of this year to make your application suitable to run on PHP 5.
For documentation on migration for PHP 4 to PHP 5, we would like to point you to our migration guide. There is additional information available in the PHP 5.0 to PHP 5.1 and PHP 5.1 to PHP 5.2 migration guides as well.
PHP 4.4.9 is the FINAL version of PHP. According to some, the Suhosin project will continue to release security updates for the 4.4 branch; however, PHP 4.x is no longer supported by the PHP group. Suhosin is a 3rd-party development project. It is highly recommended you upgrade.
There's even a web site dedicated just to encouraging the upgrade: GoPHP5.org
Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be." ~ from Nation, by Terry Pratchett
"But the main reason that any programmer learning any new language thinks the new language is SO much better than the old one is because he’s a better programmer now!" ~ http://www.oreillynet.com/ruby/blog/...ck_to_p_1.html
Bookmarks