The PHP Community's Journal (original) (raw)
Hay que revivir esta comunidad, PHP está mas vivo que nunca con su nueva versión PHP 8 liberada el pasado 26 de Noviembre 2020, en el año de la Pandemia COVID 19
Is this community dead or something?
I just started to use LJ, so i thought it would be nice to have some friends here.
I'm into coding and programming. I recently started to practice PHP and now i found this community.
So please don't judge me i'm just a kid.
I have some php 4 code that is being tested on a php 5 site. The (fairly simplistic) login uses a $_SESSION variable to track a valid login, but under php 5 it seems to lose its values when moving to a different php page.
A quick scan of the documents didn't show anything obvious about version 4 vs version 5 differences. The code uses session_start(), then checks $_SESSION['loginstuff_notactualkey'] for the user name.
Is this a coding practice that should be changed with version 5?
I've got a Microsoft Access application that I'm going to have to convert to PHP and another database (PostGres or SQLite). The db portion I could do by hand if I needed to (the tables are not complicated). It's the forms that I'm worried about.
Does anyone have any experience with a tool for converting Access forms to PHP code? I found DB Convert, which looks promising, but I'd like to know about anyone's first-hand experiences.
Inkwell Creative, a growing Portland, Oregon company focusing on web design, graphic design, interactive media, video and branding, is looking to hire a web developer. We are seeking a hard working team player and someone who is forward thinking when it comes to technology. You must be able to work with us in a collaborative team setting, know many coding and web programming languages and have a strong portfolio.
Requirements:
5+ years of experience
Strong portfolio
Must be collaborative
Knowledge of many coding/web development languages
Knowledge of CSS and HTML 5, Content Management Systems, Flash, SEO programming, Integration into Databases
Knowledge of iPhone apps a plus
Compensation:
DOE. Benefits and paid-for parking. This is a salary position.
TO APPLY:
Email a cover letter, resume and link to your online portfolio to hr@inkwellgroup.com. Please include in your cover letter any outside hobbies, passions and interests. We kindly request no phone calls and no employment agencies.
APPLICANTS WITHOUT A COVER LETTER, RESUME AND PORTFOLIO WILL NOT BE CONSIDERED
Greets,
I am starting to dabble in web programming, again, after a long hiatus. I am a Debian/Linux guy, and am hoping some folks that do web development can recommend or share which web development editors and tools they have used, liked or disliked.
I tend to use vi/emacs for programming, but think to do web site development a 'dreamweaver' or other similar tool, that helps organize and edit pages and text files for PHP, HTML, CSS, and JS would probably be better than vi or emacs :)
Let me know, and thanka.
Does anybody know when that happened?
I just stumbled across it out of sheer desperation when I was using DOMXPath to access the text value of several single nodes: title=title = title=xpath->query ('title', $ent)->item (0)->textContent;
I'm absolutely certain that when I first started (4.0? 3.x?) this was illegal since you could not follow a function call with any operator on the return value. The parser simply did not allow it and so the above code could only be written: nodelist=nodelist = nodelist=xpath->query ('title', $ent); node=node = node=nodelist->item (0); title=title = title=node->textContent;
Of course, they didn't have objects then but the same was true of arrays:
$myFunction ()[0] was illegal, now it's not.
I have a script that's working 100% fine when viewed as served by Apache. When I run it from the command line (i.e. php index.php) I get a DB connection error. Everything is the same, but when run from the command line it doesn't work. Any ideas on differences between the two methods of running the script?
Anyone had any experience with OC portal?
I'm looking for a calendar class or script that will drop into an existing application, where I can tell it where to find events, and it will populate these events on the given day in a month view.
Every php calendar I've looked at so far has it's own date tables.. I'm really only needing the "shell" of the calendar.
Is there something like this available, or should I start writing my own?
$str = "
This is a test. This test is > that test, but is less than < the other test. The previous test may be
[Error: Irreparable invalid markup ('<the [...] test,>') in entry. Owner must fix manually. Raw contents below.]
$str = "This is a test. This test is > that test, but is less than < the other test. The previous test may be than the third test. The fourth test may be < the first, but > than the last. This is the end of the test string.
";
Need to identify and convert the legit, non HTML greater/less than signs to ASCII.. I'm running out of ideas, especially with the substrings:
The previous test may be < the second test, but is likely > than the third test.and
The fourth test may be < the first, but > than the last.
Anyone have a suggestion or hint on how to accomplish this?
Hi there!
Hope developers from Russia are reading this community, cause we're looking for great professionals in Moscow. Even got special prizes for them. We're the team of Russian startup tournament called Harvest@GreenfieldProject. It'll be held on 17th-18th of April in Moscow. So if you're from Russia, pls read the text below and join our event!
Разработчики – самые дефицитные специалисты в стартапах. Поэтому на новом Harvest (РИФ+КИБ edition) мы создали вам особые условия.
Harvest (РИФ+КИБ edition) – стартап-турнир, на котором за 2 дня можно успеть то, что не получалось доделать месяцами. Победившая команда получит полностью оплаченную поездку на учёбу в летней бизнес-школе Ignite в Кембридже (Англия).
17-18 апреля пройдёт отборочный турнир для стартапов любой степени готовности: от задумки, презентуемой впервые, до развитого проекта, которому не хватает рук. Как советует Ричард Брэнсон «К черту все! Берись и делай!»
( Collapse )
Подробная информация и регистрация участников на сайте стартап-турнира: http://harvest.greenfield-project.ru/
Цена участия для разработчика составит всего 600 р. Снизить её еще на 20% можно, оплатив через интернет.
Тем, кто зарегистрировался, достаточно приехать 17 апреля с ноутбуком, знаниями и опытом в МФПА на “Семёновской” (100 м. от метро). Остальное – интернет, питание, аудитории и интересных экспертов – обеспечит команда организаторов.
I have a project where people can select from a variety of items.
When they’ve made a selection, I reduce the number of items available in a separate table that keeps count.
Now I want to make it so that the user can edit his/her decision later. That requires me to be able to (re)add items to the count that are no longer wanted/needed, and reduce the number of the new item taken.
I’ve been using radial buttons in a form, because it only allows one item (of several) from each group of items.
It’s easy for me to repopulate the form, and then update the user info…
….but I can’t wrap my head around how to detect a change from one item to the next so I can update my count.
??? Thanks for any insight you can provide.
Hello,
Is it possible to rank array_count_value()
in order of... count?
e.g.
$array = array(1,1,2,2,2,3);
array_count_value($array);
It would output, in this order: 2, 1, 3 because 2 has the highest frequency.
Thanks in advance!
SOLVED!
If I run the the code below, I get an unexpected result.
( Collapse )
My users want an option to open stored PDFs in the browser window instead of being prompted to download the file.
Current code:
if(file_exists($file)) { header('Content-Description: File Transfer'); header('Content-Type: application/octet-stream'); header('Content-Disposition: attachment; filename='.basename($file)); header('Content-Transfer-Encoding: binary'); header('Expires: 0'); header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); header('Pragma: public'); header('Content-Length: ' . filesize($file)); ob_clean(); flush(); readfile($file); exit; }
How would I write the headers to allow files to open in the browser window?
I’m helping with a web form that has a lot of selectable options.
(There must be 70 different items that can be selected by the user, in any number of combinations.)
These are represented as check boxes in the form.
I’m wondering if there is a way to create an array of all the selected items without having to check each one individually, and adding it manually.
I suppose I could make a function to do all the hard work…but I’d still have to call that function for each and every checkbox item. Seems inefficient.
Any ideas?
Wow, I'm posting a lot lately!
So I'm working on a script that will upload files to a server. Is there a way to specify what user the script uploads as, or am I just stuck with uploading as the "nothing" user?
I know I can chown it after the fact, but that just doesn't seem to work well.
Also, if I use chmod() on a directory, will the permission change also apply to all files within the directory?
Thanks!