Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I'm new to php. I have made some php code and I would like to run it within my mvc application together with razor. How is it possible for me to do so? I basically want to implement my steamlogin php script into the autogenerated homepage on mvc.
This is a school project!
Thanks!
You can run PHP in the project (ASP.NET MVC) as html page (dynamic files) but you can't return a .php file from Controller.
How can I execute PHP code from ASP.NET MVC
As it's school project, it's look like you have write some functionality in PHP. You can send POST request to .php file handle the code in the .php file and show the response.
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
i'm a beginner in php but want to expand my knowledge. so i want to create a cms from scratch.
i already have an idea how to create a post. by inserting data to database
and populate the html file with the data(post) that came from the database
example this is my website
domainname.com/index.php --- and this is the address of my homepage
on my homepage, i want to show some preview of my each post.
something like this,
and if the user of the website click the post.
it will go to another page
domainname.com/postname.php
and with the data like this
so my question is how do the CMS create the file for every post.
the idea in my mind is creating the html file dynamically using php and naming the file with the name of the post. but is it a good practice? or am i doing it right?
While generating static files (whenever the admin interface is used to make a change) will work, it isn't a typical approach for a CMS.
Usually they will apply the front controller pattern (in which each request for a content page, despite having different URLs, is funneled through the same PHP program, something that is often achived with the Apache mod_rewrite module) and generate the requested page on demand.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
Helou, I'm frontend developer and my PHP knowledge is on begginers level. I have Laravel Site build with Sximo by other developer. I need to add a new .css and .js files for backend platform, but I don't know where. I added to public folder these files, but don't know how to call them. Can anyone help me?
P. S. No, I can't add it manuel, it's not for frontend page. :)
You need to add all .js and .css files into a public directory inside of your Laravel project directory:
public/css/my.css
public/js/mybig.js
Please read here how to add them to a view (recipe valid for Laravel 4 apps and Laravel 5 apps with Laravel Collective installed):
http://laravel-recipes.com/recipes/184/generating-a-link-to-a-css-file
Also, I think you'd want to learn about how Blade Template system works.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
How can I navigate on a website, using php ? (I want with a local program to access a website and parse html pages, fill forms, click buttons and being redirected, etc.; as if PHP was a real guy). Yet, I use Ruby Mechanise but it's not sufficient.
Thanks
To interact with a website you would most likely use a javascript framework such as phantomjs or dalekjs. PHP is not made for DOM manipulation and interaction or page automation.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I apologize for asking such a beginner question, but i'm unsure on where else I could go to get such help. I'm currently creating a php website using GoggleApp Engine. I've created a very simple form using html in the same file as my PHP. Now, I know this isn't good practice, so I want to break up my html into it's own file. My only question is, how would I re-write this code assuming that my html is in it's own file?
It is perfectly fine to place your PHP code in the same file as your HTML code. However, if you are going to duplicate code, it would be best to have separate files (maybe say a header and footer file).
That way you can use require_once("header.php") and require_once("footer.php") in each file that wants to use the top and bottom portions of your code.
As Sven mentioned, you can look into templating. You can also look into coding habits such as MVC (Model View Controller) and similar methods.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
How run php,java script,asp,html,css file in the wordpress cms?
similar w3school.com
http://www.w3schools.com/php/default.asp
Wordpress is a CMS written in PHP, that is the server-side language used. HTML/CSS/Javascript will all work nicely with PHP (you can put all three directly into your .PHP files and they will be rendered).
ASP is a different server-side language, picking one or the other for your project is probably a good idea. (Also, I don't think w3schools is running Wordpress, it is their own ASP code)