Jump to content

Recommended Posts

Posted

php.gif

 

Καλησπερα, σε αυτο το guide θα σας διξω καποια πραγματακια για την γνωστη γλωσσα προγραμματισμου PHP. Πολλες online εφαρμογες ειναι βασισμενες στην PHP οπως το facebook, το maxcheaters, etc. Με την php εχεις την δυνατοτητα δημιουργιας δυναμικων web εφαρμογων.

 

Τι σημαινουν τα αρχικα "PHP"?

H php δημιουργηθηκε το 1994 απο τον Rasmus Lerdorf. Στην αρχη το PHP συμαινε Personal Home Page. Τωρα σημαινει Php Hypertext Preprocessor.

 

Τι σχεση εχει η PHP με το lineage?

Η PHP δεν εχει καποια αμεση σχεση με το lineage. Ομως με την PHP δουλευουν διαφορες web εφαρμογες που "συνεργαζονται" με το l2.. Οπως ο account manager, το vote system και διαφορα αλλα.

 

Τι χρειαζομαι για να αρχισω να προγραματιζω με την PHP?

Το μονο που χρειαζεται καποιος για να αρχισει την δουλεια, ειναι να εχει εγκατεστημενη την PHP στο μηχανιμα που επροκειτο να χοσταρει την σελιδα του και ενα text editor.. Συνηστω το notepad ++. Παρολα αυτα και το απλο notepad των windows κανει την δουλεια του.

 

Links:

PHP: http://php.net/

Notepad ++: http://notepad-plus-plus.org/

 

Και ξεκιναμε..

 

Το πιο απλο function της PHP ειναι το echo. H εντολη αυτη μας επιτρεπει να εμφανισουμε ενα κειμενο ή ενα μερος html κωδικα στην σελιδα μας..

Ανοιξτε το notepad και γραψτε:

<?php
echo "Hello Maxcheaters.";
?>

 

Στην αρχη του script θα παρατηρησατε το <?php και στο τελος το ?>. Παντα οταν παμε να προγραμματισουμε με την php πρεπει να γραψουμε αυτα τα δυο κομματακια και να γραψουμε ολο των κωδικα μας μεσα σε αυτα αλλιως δεν θα δουλεψει.

Υστερα βλεπουμε το echo και δυπλα βλεπουμε την φραση . Με αυτην την εντολη λεμε στην php να γραψει στην σελιδα μας την φραση Hello Maxcheaters.. Επισης στο τελος της εντολης υπαρχει ενα ελληνικο ερωτηματικο. ";" Στο τελος καθε εντολης βαζουμε αυτο το συμβολο για να διχνουμε που τελιωνει.. Αν δεν το γραψουμε θα παρουσιασει σφαλμα και δεν θα δουλεψει ο κωδικας μας.

Αποθηκευστε το αρχειο ως test.php . Αν δεν βαλουμε αυτην την καταληξη και βαλουμε κατι αλλο οπως .htm δεν προκειται να δουλεψει. Τρεξτε το στον web server σας και ειδου το αποτελεσμα.

 

http://i54.tinypic.com/23tmfme.png

 

Συνοψηζοντας:

~Παντα αρχιζουμε να προγραμματιζουμε βαζοντας τα <?php και ?> στην αρχη και το τελος.

~Παντα στο τελος καθε γραμμης κωδικα βαζουμε το ";".

~Παντα αποθηκευουμε το αρχειο μας ως blahblah.php.

 

Επειδη οι δυνατοτητες και οι εντολες της php ειναι παρα πολλες δεν μπορω να γραψω περισσοτερα απο τα βασικα.

 

Για περισσοτερες πληροφοριες:

http://www.php.net

http://youtube.com/PHPavlos

 

Credits To Me.

  • 3 months later...
  • 3 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Posts

    • Okay, I understand. First, to get started by contributing to open projects and learning along the way. Then, when you mention starting my own project privately, do you mean taking a free datapack like L2jMobius and trying to make it functional for an online server? Great, thank you very much — all this information is really helpful. I’ve been reaching out to several server admins here in Argentina, but it seems like none of them have the time or interest to take on an intern or assistant. xd   P.S.: Are you the creator of Hopzone? Brings back memories of when I was a kid, downloading servers at the cyber café. For two dollars, I could spend the whole day playing and eating candy like crazy.   Another question: between L2jMobius, L2jServer, and aCis, which one has ALL of its code free? As you probably noticed, I'm using ChatGPT to help me translate things, lol, and it suggested the following: Project Status Open Source Accepts Juniors? Difficulty L2JMobius Very active Semi-closed Partially (with patches) Medium-High L2JServer Active Fully open Yes (directly on GitHub) Medium aCis Semi-active Unofficial Not very clear Low
    • @Logan22 Are you logan from mmo-dev forum?
    • That's exactly how it’s designed — everything important is handled on the API server side, for example, processing requests to the game server. Each website has its own token/key for authentication; without it, there will be no interaction with the game server. Some data can be stored both on my side and on the server side to avoid making frequent requests to the server, which is logical.   Yes, there’s a lot of old, unused code that just needs to be cleaned up. It was used before, but after major rewrites it was left lying around. It doesn’t interfere with anything — it’s just there and doesn’t affect the system's operation.   Beaver meme kurwa is my favorite. Unfortunately, you don't know Russian — otherwise, you would’ve spotted even more Easter eggs. 😂   I said it’s been installed over 250 times on different domains. You can join my Telegram, there are almost 200 people there — and those are just the ones who entered the chat — and we’ll have a good laugh together at your doubts! 😂😂😂
    • Discord : utchiha_market Telegram : https://t.me/utchiha_market Auto Buy Store : https://utchihamkt.mysellauth.com/ Join our server for more products : https://discord.gg/qtkJASMbKV https://campsite.bio/utchihaamkt  
  • Topics

×
×
  • Create New...