Answer the question
In order to leave comments, you need to log in
How to properly connect the Git repository of the project folder?
There are two folders on the local machine for the same web project: dev and stable. The dev folder contains a test version of the project, which we finalize and run on the local server. The stable folder contains a “stable” version of the same project, from this folder we upload files to the hosting.
Folder structure dev and stable:
framework - folder with php-framework
application - folder with project php-files
scripts - folder with js files
media - folder with css styles
We develop only in application and scripts folders.
In turn, the application folder contains:
bootstrap.php - the project configuration file, where you can set the base url settings, etc. The settings are different for the local project (dev) and the project for hosting (stable).
views - parent with view files
classes
- folder with project controller and model class files
/scripts would update files in similar folders in the stable directory?
Answer the question
In order to leave comments, you need to log in
It would be logical to read about branching in git and make two branches for yourself - one dev, the other stable. All work should be carried out in the dev branch, and, as necessary, merged into stable.
We need to add e.preventDefault() so that the form is not submitted.
$('#form').submit(function(e){
e.preventDefault();
$.ajax({
type: "POST",
url : "mail.php",
data: $(this).serialize()
}).done(function(){
alert('success');
})
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question