Introduction to PHP PHP (Hypertext Preprocessor) is a server-side scripting language designed for web development. PHP code is executed on the server, and the result is sent to the browser as plain HTML. PHP statements end with a semicolon ; . PHP is case-sensitive for variable names but not for keywords. Variables Variables declared with $ symbol -> $name = "Anil"; Types are determined automatically (loosely typed). Variable names must start with a letter or an underscore _. Data Types String → "Hello, World!" Integer → 25 Float → 10.5 Boolean → true or false Array → ["PHP", "MySQL", "JavaScript"] Object → Instance of a class NULL → Represents a variable with no value Strings Functions strlen($str) → Returns the length of a string. str_replace("find", "replace", $str) → Replaces text within a string. strtolower($str) → Converts to lowercase. strtoupper($str) → Converts to uppercase. substr($str, start,...
In this post we will setup app.js file to make app running first write below code below -> import express from "express" import cors from "cors" import morgan from "morgan" const app = express () app. use ( cors ()) app. use ( express . json ()) app. use ( morgan("dev") ) app. get ( '/' , ( req , res ) => { res . json ({message: "CMS Backend API Running." }) }) export default app and save express.json() — JSON body parse karta hai cors() — frontend (Next.js) ko API call karne deta hai morgan("dev") — console me request logs dikhata hai Base route / — test karne ke liye ready hai
WordPress Setup in Localhost The Famous loop in Wordpress for Generating posts Setting global Header and Footer in Wordpress Convert static HTML template into wordpress Interior Page Template Dynamic in Wordpress Display dynamic title in Browser tab for wordpress for every page Make manually menu links for wordpress Add homepage url in Header logo in wordpress Create parent and children page in Wordpress with BreadCrumb
Comments
Post a Comment