Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,153,015 members, 7,817,993 topics. Date: Sunday, 05 May 2024 at 02:37 AM

Everyday PHP Programming Challenge (solved) - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / Everyday PHP Programming Challenge (solved) (1635 Views)

Someone Should Tutor Us On BASIC, HTML, PHP Programming / Programming Challenge: Convert String to Json with a Loop / Common Error In Laravel #1:solved File_put_contents Failed To Open Stream (2) (3) (4)

(1) (Reply) (Go Down)

Everyday PHP Programming Challenge (solved) by guru01(m): 5:23pm On Jan 08, 2016
Hi guys and lovers of PHP.
I will be posting some other the everyday challenge I encountered while working with Php.
I invite you to join me.

Re: Everyday PHP Programming Challenge (solved) by guru01(m): 7:12pm On Jan 08, 2016
This happened today, it was my first time working with zip file.
The issue came up when i opened the file like this:
$zFile = $zip->open($filePath,  \ZipArchive::OVERWRITE);
$zip->extractTo($bookDir);

After opening the file i was trying to extract to another directory, this returns true but no extracted data was found.
The is a really troublesome bug, but thank God for the internet.
After sometime i debugged and removed the \ZipArchive::OVERWRITE and it worked.

$zFile = $zip->open($filePath);
$zip->extractTo($bookDir);

Re: Everyday PHP Programming Challenge (solved) by rushman003: 10:00am On Jan 09, 2016
How do I populate a drop down menu by automatically calling a field from my database every time the field is updated
Re: Everyday PHP Programming Challenge (solved) by guru01(m): 1:08pm On Jan 09, 2016
rushman003:
How do I populate a drop down menu by automatically calling a field from my database every time the field is updated
Let's see your code.

Re: Everyday PHP Programming Challenge (solved) by guru01(m): 1:13pm On Jan 09, 2016
rushman003:
How do I populate a drop down menu by automatically calling a field from my database every time the field is updated
You can call a field from you database constantly using jquery Ajax with the set time interval function of javascript.
The ajax should be call you php script the fetch info from db like every 10s or how ever you want it.
Re: Everyday PHP Programming Challenge (solved) by guru01(m): 5:42pm On Jan 11, 2016
Search and replace string in php.
Search and replacing string is not difficult using the function str_replace();
I have to search a string (actually an html content which i extracted from a file using file_get_content()), string to was src=" and replace with src="http://path/to/the/image/folder/ and i acheived this by simply
str_replace('src="','src="http://path/to/the/image/folder/',$str);
Re: Everyday PHP Programming Challenge (solved) by nnamdiosu(m): 8:54am On Jan 12, 2016
wow. nice. but why did you stop op? can I post my own challenges ?
Re: Everyday PHP Programming Challenge (solved) by guru01(m): 4:54pm On Jan 12, 2016
nnamdiosu:
wow. nice. but why did you stop op? can I post my own challenges ?
Yes you can, am sure every PHP develop is glad to assist you.
Re: Everyday PHP Programming Challenge (solved) by guru01(m): 1:03pm On Jan 14, 2016
I was working with a script developed by something else and i got hooked because i could not post content due to some logical issue with the programming of the script.
The script was design to upload file whether empty or not and this was causing problem for me because i am not attaching a file to the post.
Here is the code to here detect if the file upload is not empty:
if(!$_FILES["file"]['error'] == 4){ //process upload }


That solves the issue, i could now post without upload a file.

Re: Everyday PHP Programming Challenge (solved) by webmasteremma(m): 11:49pm On Jan 16, 2016
Good Evening All,
I have a challenge using PHP, I am a final year student and I am doing a project that involves biometrics. E.g Finger Print, how can I do this using PHP/MYSQL. I need assistance.
My number is 0805 816 7357. You can also Email: nnamdi.chukwuma@gmail.com

(1) (Reply)

Need Someone That Can Write Php Marketing Script. / I Need A Blog / Basic, Fortran And Cobol Are High Level Language But Why Are The Compiler Not Common?

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 19
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.