Back | Reverse | Quick Reply | Post Reply |

PHP Learning
Link | by ArrowHead on 2006-11-28 18:26:49
I am learning about php...
But I want some sample and guide to learn..
I found that many site are using php now. I wonder if I can download one to see the source. Can I really do it? because everytime I do a request it always return html page. Can I download original php page??

Re: PHP Learning
Link | by gendou on 2006-11-28 20:34:04 (edited 2006-11-28 20:35:32)
the php code of a web page is private. there is at least one page i know that does provide php source.

check out php.net for reference.

i dont know where to go for sample code.
if i were you, i would pick a project and then use google to find a sample implementation.


Re: PHP Learning
Link | by ArrowHead on 2006-11-28 20:49:09
I am currently designing an Intranet...
I used to make forum using ASP, but I found it difficult to plant and store images to database using it. I have to make image folder that have many files in it. I was told by my friend that using php will help...
I downloaded AppServ from AppServNetwork and want to implement it..
Do you have any suggestion how to make forum using php. Give me tutorial, please...

Oh, ya... one more question...
Can php use dinamic library (DLL) made with Visual C++ or Visual Basic ?

Re: PHP Learning
Link | by gendou on 2006-11-29 02:03:58 (edited 2006-11-29 02:06:49)
Tips:

1. never, ever, store images in a MySQL database! bad coder, no biscuit! just use the filesystem. thats why its there!!
2. stay away from ASP and everything microsoft. its bad mojo.
3. php uses modules for expanded functionality. some modules are implemented using DLL files on windows, i believe. i have not checked to see if this is true or not, its just a guess. go see for yourself on php.net
4. um.... start by defining your design requirements.... then do a feasibility study.... then make a UML design with the best solution.... then make the database.... then code the php... duh? at least thats what they teach you in school! lol. no, but seriously, start by KNOWING WHAT YOU WANT. then just MAKE IT! thats how programming is done!
5. AppServ? AppServNetwork? what are you smoking? GET LINUX!!!!!
6. visual C++? visual basic? what are you smoking?! ditch microsoft!!!!!!


Re: PHP Learning
Link | by EmptyMind on 2006-11-29 22:21:52
If you just want a forum, you can always go to phpbb.com and install that.

>,>; Did I just say that...?

Re: PHP Learning
Link | by r3ck0rd on 2006-11-30 05:22:29
Well I recommend SMF other than phpBB.

The codename's r3ck0rd. Find me in my Facebook Profile Page, or in my blog.

Re: PHP Learning
Link | by psoplayer on 2006-12-01 23:47:34
Even if you don't use phpBB, you can still go download it. After all, it is a bunch of PHP source files. That is what you wanted isn't it?


Re: PHP Learning
Link | by ArrowHead on 2006-12-05 17:58:50 (edited 2006-12-05 20:40:00)
Thanks a lot for the info...
I will find some clue there...
Umm..now I find it difficult to type php code...
do you guys know a good php editor...???
umm..gendou-san what do you mean by not good storing images on mysql..
but my friend (he's good programmer) said that it'll be good for managing data and not files, because it's more simple...( Or maybe because he's no good handling files :P)...
Oh, ya...one more thing to ask...
on the bottom of each page, there are "Page loaded in 0.xxxx seconds"
How to make something like that..?

Re: PHP Learning
Link | by EmptyMind on 2006-12-05 22:48:08
I'm not quire sure about the database thing, but I'm pretty sure you store the files somewhere else, and have addresses of the files stored in the database. (Prepares to be god-smitten for stupidity)

As for file editors, I use TextPad (for Windows). I was also recommended Programmer's Notepad 2 (also for Windows).

If you're on a Linux/Unix machine, I'd use Vim :P

>,>; Did I just say that...?

Re: PHP Learning
Link | by gendou on 2006-12-05 23:21:04
first, define these 2 functions:
function start_page()
{
	list($usec, $sec) = explode(" ", microtime());
	$microtime = (float) $usec + (float) $sec;
}

function load_time()
{
	list($usec, $sec) = explode(" ", microtime());
	return (float)(((float)$usec + (float)$sec) - $microtime);
}
then, call start_page() at the beginning of your code (right after you define the functions).
somewhere at the end of your code, put this:
Page loaded in <?=load_time()?> seconds



Re: PHP Learning
Link | by Renegade Bladesman on 2006-12-08 02:42:17
I am also learning PHP to upgrade my site with, i've got a warning for people who are just starting, avoid the W3C reference lists until you have a fairly solid idea about PHP, some of the functions and systems they show are really confusing unless you know what you're doing. Just for the record, I'm no expert at PHP yet so I only use that place for functions I know about.

Even from the realms beyond Life, Death, Infinity and Eternity, I still see you

Re: PHP Learning
Link | by ArrowHead on 2006-12-12 18:28:03
I found a book about php...
The writer make mysql database and using text data type to store date and time (or timestamp?? I don't know the difference... Please tell me..)
MySQL have datetime and timestamp type, right?? Is it better using text? or better use the datetime/timestamp type?? (the author didn't explain about it..)
Renegade :
my friend told me to get reference for html and css there?? but i haven't visited that page yet?? is it really spooky, that W3C??
Gendou :
thanks for the function.. i have another question (about your page too..)
when I save your page, the navigation menu doesn't work anymore when offline (I'm using IE, or maybe I should use firefox instead, I heard Firefox 2 is already launched)...I tried it many times but I couldn't make it works. you're using css to make it like menu bar, right?? does it have relation with php??

Re: PHP Learning
Link | by gendou on 2006-12-12 18:40:40 (edited 2006-12-12 18:41:42)
in order for my navigation menu to work in IE, you need to save http://gendou.com/include/navigation.htc
this is only necessary because IE does not yet support CSS correctly.

CSS is a display markup, PHP is a scripting language.
their only relationship is that CSS can be the output of PHP.


Re: PHP Learning
Link | by psoplayer on 2006-12-18 20:43:57
(Stolen from a slashdot siggy)

Internet Explorer's CSS rendering: WYSIWTF


Re: PHP Learning
Link | by ArrowHead on 2006-12-19 18:05:00 (edited 2006-12-19 18:06:16)
Gendou:
I tried to save navigation.htc..but the saved page couldn't access the file. I put the file (navigation.htc) in C:include and the page in C:. It said error on page. Access is denied to file:///C:/include/. I checked the file system access but I should have full access to that file and directory...What should I do..?

psoplayer:
What is WYSIWTF..??

All:
1. Which one is better? make css in another file and then link it OR have php make css in every page?
2. Can we call the php parser (i think it's php.exe) a compiler?? My lecturer ask me so after I discuss php and compiler???

Re: PHP Learning
Link | by puppypup on 2007-06-12 20:11:35
This thread isn't active for a while...
I wonder if I can continue this thread ?

About PHP Programming..
How's the code to detect whether a user is still connected to server. I'm using user login for my small site. I want that if a user isn't active for a while, he/she has to login again. I read in a book that I have to use cookie, but my site doesn't handle any cookie and I don't want it either. Can I make one without cookie?

Re: PHP Learning
Link | by gendou on 2007-06-12 20:36:31 (edited 2007-06-12 20:38:32)
you must use either cookies or a persistent $_GET parameter to maintain login sessions, the later being in quite poor taste. get over it. use cookies.

when a user requests a page, update an entry in your database to keep track of their latest activity.
if they were active within the last couple minutes, it can be assumed they are "online".


Re: PHP Learning
Link | by puppypup on 2007-06-12 21:01:04
Thanks for the help

My friends made a College Academic Information System as their Final Project, while I made a Friendster-like site only for my college student for my Final Project, but in different server. I used a free-hosting AwardSpace and host my site there. My site require a Student ID validation when a user registered themselves. I had an idea to connect to my friends' site to ask for the validity of the Student ID using fsockopen(). When I uploaded it, it said the function was disabled for security reason. I searched in google how to solve it, but it seems that the problem is on the server.
Can I connect to my friends' site for validation another way? This is a problem from a year ago.. And now the server still disabled to function. I just wonder if I can make it better now...

Re: PHP Learning
Link | by kougyounushi on 2007-07-09 13:55:07
i pass my web based progamming so-so. not interested with it except when they teach on how to use dreamweaver.. well now i'm regret cause some of my personal page need a comment and i cant call funtion to save the comment.. blah.. hope you the best,..

Re: PHP Learning
Link | by puppypup on 2007-07-10 21:53:59
Macromedia Dreamweaver ??

I do programming with PHP Editor, directly handling the code. My friends call me BAKA because of that. But when I tried Dreamweaver, I have no idea of how to use it. How about the other ??

Back | Reverse | Quick Reply | Post Reply |
Go to page: 0, 1 Displaying 1 to 20 of 26 Entries.

Copyright 2000-2024 Gendou | Terms of Use | Page loaded in 0.0039 seconds at 2024-05-04 02:57:02