20-12-16, 02:56 AM
السلام عليكم ورحمة الله وبركاته
اخي الكريم
اولا كود عمل صفحة html
ثانيا كود التعديل
بالتوفيق
اخي الكريم
اولا كود عمل صفحة html
PHP كود :
Dim sFileText As String
Dim iFileNo As Integer
iFileNo = FreeFile
'ÝÊÍ ÇáãáÝ
Open App.Path & "\" & "test.html" For Output As #iFileNo
Print #iFileNo, "<html>"
Print #iFileNo, "<head>"
Print #iFileNo, "</head>"
Print #iFileNo, "<body>"
Print #iFileNo, " "
Print #iFileNo, "<div class=" & "nav mainnavs" & "></div>"
Print #iFileNo, " <ul>"
Print #iFileNo, " <li><a id=" & "nav-questions" & " href=" & "/questions" & ">Questions</a></li>"
Print #iFileNo, " <li><a id=" & "nav-tags" & " href=" & "/tags" & ">Tags</a></li>"
Print #iFileNo, " <li><a id=" & "nav-users" & " href=" & "/users" & ">Users</a></li>"
Print #iFileNo, " "
Print #iFileNo, " <li><a id=" & "nav-badges" & " href=" & "/badges" & ">Badges</a></li>"
Print #iFileNo, " <li><a id=" & "nav-unanswered" & " href=" & "/unanswered" & ">Unanswered</a></li>"
Print #iFileNo, " </ul>"
Print #iFileNo, "<div class=" & "nav askquestion" & "></div>"
Print #iFileNo, "</body>"
Print #iFileNo, "</html>"
MsgBox "Êã ÇáÇäÔÇÁ Çæ ÇáÊÚÏíá ááãáÝ"
Close #iFileNo
ثانيا كود التعديل
PHP كود :
'كود التعديل
Const ForReading = 1
Const ForWriting = 2
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile(App.Path & "\" & "test.html", ForReading)
strText = objFile.ReadAll
objFile.Close
strNewText = Replace(strText, "Questions123", "Questions")
Set objFile = objFSO.OpenTextFile(App.Path & "\" & "test.html", ForWriting)
objFile.WriteLine strNewText
objFile.Close
بالتوفيق
محاسب / أحمد عبد العليم
الى اللقاء ان شاء الله
الى اللقاء ان شاء الله

