Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Arthur BOSSHARDT
Projet_Tutore_ANNEE_2
Commits
788ff3d7
Commit
788ff3d7
authored
Jan 18, 2018
by
Charles DORMEVAL
Browse files
ajout de la partie moteur de recherche + modelebd
parent
8a9ac6ea
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/extraireCitation/extraireCitation.php
View file @
788ff3d7
...
...
@@ -30,7 +30,7 @@ function suppr_accents($str, $encoding='utf-8')
$fichier
=
"../../data/
testCitation
s.txt"
;
$fichier
=
"../../data/
Toute
s.txt"
;
$handle
=
fopen
(
$fichier
,
"r"
);
$content
=
fread
(
$handle
,
filesize
(
$fichier
));
$split
=
explode
(
"
\n
"
,
$content
);
//on separe pour chaque saut de ligne
...
...
src/extraireCitation/extraire_citation_tableau_final.php
View file @
788ff3d7
...
...
@@ -43,17 +43,18 @@ foreach ($pre_citations as $courant){
/*------BDD-PARTIE2-PRE-------------*/
try
{
$bdd
=
new
PDO
(
'mysql:host=localhost;dbname=projet
_citations
;charset=utf8'
,
'root'
,
''
);
$bdd
=
new
PDO
(
'mysql:host=localhost;dbname=projet;charset=utf8'
,
'root'
,
''
);
}
catch
(
Exception
$e
){
die
(
'Erreur : '
.
$e
->
getMessage
());
}
for
(
$i
=
0
;
$i
<=
200000
;
$i
++
){
if
(
$citationtableau
[
$i
]
!=
""
){
$req
=
$bdd
->
prepare
(
"insert into citations
_pre
(id_citation
s
, contenu) values(:id_citation
s
, :contenu)"
);
$req
=
$bdd
->
prepare
(
"insert into citations(id_citation, contenu
, id_oeuvre
) values(:id_citation, :contenu
, :id_oeuvre
)"
);
$req
->
execute
(
array
(
'id_citations'
=>
$i
,
'contenu'
=>
$citationtableau
[
$i
]
'id_citation'
=>
$i
,
'contenu'
=>
$citationtableau
[
$i
],
'id_oeuvre'
=>
$i
));
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment